You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Warner Onstine <wa...@warneronstine.com> on 2002/02/23 00:18:07 UTC

making my own template

Hi all,
I have been trying to figure out how to do this in Turbine 2.x and have been
having similar problems to others on the list. How does one create their own
html velocity template? When I tried it I ended up with double the needed
headers. I have been pouring through the code and cannot figure out where
this is specified.

If there is a better way I'll just explain what I'm trying to accomplish: I
need to add a stylesheet to my html pages  so I can better control how the
page renders.

I know that Scarab does this and I have only glanced at it briefly, but it
also uses Turbine 3.x which is of course drastically different.

Any help would be greatly appreciated.

And if this would be helpful to others I would gladly turn it into an xdoc
for the site.

-warner

+warner onstine+


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: making my own template

Posted by Jason van Zyl <jv...@zenplex.com>.
On Fri, 2002-02-22 at 18:38, Warner Onstine wrote:
> Duh, thanks! It's been a while since I looked at the sample app I created
> =). This pulls up an interesting question:
> When I was delving into the scarab stuff I found the renderer reference
> $renderer.render, but could not find where this gets placed in the context.
> Where does this get placed into the context?

Currently in Turbine 3.x this happens here:

http://cvs.apache.org/viewcvs/jakarta-turbine-3/src/java/org/apache/turbine/pipeline/DefaultTargetValve.java?rev=1.12&content-type=text/vnd.viewcvs-markup

 
> -waarner
> 
> ----- Original Message -----
> From: "Jason van Zyl" <jv...@zenplex.com>
> To: "Turbine Users List" <tu...@jakarta.apache.org>
> Sent: Friday, February 22, 2002 4:21 PM
> Subject: Re: making my own template
> 
> 
> > On Fri, 2002-02-22 at 18:18, Warner Onstine wrote:
> > > Hi all,
> > > I have been trying to figure out how to do this in Turbine 2.x and have
> been
> > > having similar problems to others on the list. How does one create their
> own
> > > html velocity template? When I tried it I ended up with double the
> needed
> > > headers. I have been pouring through the code and cannot figure out
> where
> > > this is specified.
> >
> > Did you look at the TDK? You can save yourself a lot of grief by
> > generating the sample app and looking at the layout for a working
> > application.
> >
> > > If there is a better way I'll just explain what I'm trying to
> accomplish: I
> > > need to add a stylesheet to my html pages  so I can better control how
> the
> > > page renders.
> > >
> > > I know that Scarab does this and I have only glanced at it briefly, but
> it
> > > also uses Turbine 3.x which is of course drastically different.
> > >
> > > Any help would be greatly appreciated.
> > >
> > > And if this would be helpful to others I would gladly turn it into an
> xdoc
> > > for the site.
> > >
> > > -warner
> > >
> > > +warner onstine+
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> > --
> > jvz.
> >
> > Jason van Zyl
> > jvanzyl@apache.org
> >
> > http://tambora.zenplex.org
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
> >
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
-- 
jvz.

Jason van Zyl
jvanzyl@apache.org

http://tambora.zenplex.org


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: making my own template

Posted by Warner Onstine <sw...@warneronstine.com>.
Duh, thanks! It's been a while since I looked at the sample app I created
=). This pulls up an interesting question:

When I was delving into the scarab stuff I found the renderer reference
$renderer.render, but could not find where this gets placed in the context.
Where does this get placed into the context?

-waarner

----- Original Message -----
From: "Jason van Zyl" <jv...@zenplex.com>
To: "Turbine Users List" <tu...@jakarta.apache.org>
Sent: Friday, February 22, 2002 4:21 PM
Subject: Re: making my own template


> On Fri, 2002-02-22 at 18:18, Warner Onstine wrote:
> > Hi all,
> > I have been trying to figure out how to do this in Turbine 2.x and have
been
> > having similar problems to others on the list. How does one create their
own
> > html velocity template? When I tried it I ended up with double the
needed
> > headers. I have been pouring through the code and cannot figure out
where
> > this is specified.
>
> Did you look at the TDK? You can save yourself a lot of grief by
> generating the sample app and looking at the layout for a working
> application.
>
> > If there is a better way I'll just explain what I'm trying to
accomplish: I
> > need to add a stylesheet to my html pages  so I can better control how
the
> > page renders.
> >
> > I know that Scarab does this and I have only glanced at it briefly, but
it
> > also uses Turbine 3.x which is of course drastically different.
> >
> > Any help would be greatly appreciated.
> >
> > And if this would be helpful to others I would gladly turn it into an
xdoc
> > for the site.
> >
> > -warner
> >
> > +warner onstine+
> >
> >
> > --
> > To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> > For additional commands, e-mail:
<ma...@jakarta.apache.org>
> --
> jvz.
>
> Jason van Zyl
> jvanzyl@apache.org
>
> http://tambora.zenplex.org
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: making my own template

Posted by Jason van Zyl <jv...@zenplex.com>.
On Fri, 2002-02-22 at 18:18, Warner Onstine wrote:
> Hi all,
> I have been trying to figure out how to do this in Turbine 2.x and have been
> having similar problems to others on the list. How does one create their own
> html velocity template? When I tried it I ended up with double the needed
> headers. I have been pouring through the code and cannot figure out where
> this is specified.

Did you look at the TDK? You can save yourself a lot of grief by
generating the sample app and looking at the layout for a working
application.
 
> If there is a better way I'll just explain what I'm trying to accomplish: I
> need to add a stylesheet to my html pages  so I can better control how the
> page renders.
> 
> I know that Scarab does this and I have only glanced at it briefly, but it
> also uses Turbine 3.x which is of course drastically different.
> 
> Any help would be greatly appreciated.
> 
> And if this would be helpful to others I would gladly turn it into an xdoc
> for the site.
> 
> -warner
> 
> +warner onstine+
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
-- 
jvz.

Jason van Zyl
jvanzyl@apache.org

http://tambora.zenplex.org


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: making my own template

Posted by Warner Onstine <sw...@warneronstine.com>.
Thanks, I was still banging my head as $renderer.render was not being
recognized (still isn't after making the below switch). Now everything is
rendering with my headers.

-warner

----- Original Message -----
From: "Pete Kazmier" <pe...@kazmier.com>
To: <tu...@jakarta.apache.org>
Sent: Friday, February 22, 2002 6:55 PM
Subject: Re: making my own template


> If you want to add your own HTML headers to a layout, you need to change
> the value of the default layout in your Turbine.resources from
> "VelocityECSLayout" to "VelocityOnlyLayout":
>
> services.VelocityService.default.layout = VelocityOnlyLayout
>
> By making this change, you are responsible for all of the output.
>
> Not sure if this helps, as I've never used Turbine yet (and I stress the
> word 'yet')!
>
> On Fri, Feb 22, 2002 at 04:18:07PM -0700, Warner Onstine wrote:
> > I have been trying to figure out how to do this in Turbine 2.x and
> > have been having similar problems to others on the list. How does one
> > create their own html velocity template? When I tried it I ended up
> > with double the needed headers. I have been pouring through the code
> > and cannot figure out where this is specified.
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: making my own template

Posted by Pete Kazmier <pe...@kazmier.com>.
If you want to add your own HTML headers to a layout, you need to change
the value of the default layout in your Turbine.resources from
"VelocityECSLayout" to "VelocityOnlyLayout":

services.VelocityService.default.layout = VelocityOnlyLayout

By making this change, you are responsible for all of the output.  

Not sure if this helps, as I've never used Turbine yet (and I stress the
word 'yet')!

On Fri, Feb 22, 2002 at 04:18:07PM -0700, Warner Onstine wrote:
> I have been trying to figure out how to do this in Turbine 2.x and
> have been having similar problems to others on the list. How does one
> create their own html velocity template? When I tried it I ended up
> with double the needed headers. I have been pouring through the code
> and cannot figure out where this is specified.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>