I should type faster (and stop eating).  Lots of good responses to your
questions.

If all you want to do is include a header, then you don't need to use the
layout pattern, so header.tml can be something like:

<h1>some standard header</h1>

And that's it.

The layout pattern is handy if you want to be able to have things like
menus, or standard CSS files, and change the arrangement of your application
without modifying every page.  For example, you could move from a menu on
the left to a menu across the top by only changing your Layout component.  I
tend to us the Layout pattern for the long-term flexibility.

Jonathan



> -----Original Message-----
> From: Heck, Bob [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 18, 2007 12:27 PM
> To: Tapestry users
> Subject: RE: Templates and t:body
> 
> Or, maybe I should just start at the top.
> 
> I have a header that I want to display on every page.  That header html
> (tml) markup is stored in the file header.tml
> 
> How do I include this in another file, say hello.tml?  What is the syntax
> and component usage?
> 
> 
> 
> -----Original Message-----
> From: Thiago H de Paula Figueiredo [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 18, 2007 12:17
> To: Tapestry users
> Subject: Re: Templates and t:body
> 
> On Thu, 18 Oct 2007 13:05:48 -0300, Heck, Bob <[EMAIL PROTECTED]> wrote:
> 
> > So, how does layout.tml know to use specific.tml to fill in the
> > <t:body/> tag?  Does it have to be injected somehow?  Where does it
> > get a reference? How is this done?
> 
> <t:body> just renders whatever was put inside your <t:layout> tag. ;) The
> specific page uses the layout, not the inverse.
> 
> 
> --
> Thiago H. de Paula Figueiredo
> Desenvolvedor, Instrutor e Consultor de Tecnologia Eteg Tecnologia da
> Informação Ltda.
> http://www.eteg.com.br
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to