It worked for me. Make sure you have created a Header class in your components package.
My .java files are bare class declarations, so here are my .tml files: Hello.tml <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"> <head><title>Some Title</title></head> <body> <t:header /> </body> </html> Header.tml <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"> <H1> test header</H1> </html> The resulting page source: <html> <head><link href="/assets/tapestry/default.css" rel="stylesheet" type="text/css"><title>Some Title</title></head> <body> <html> <H1> test header</H1> </html> </body> </html> It also works whether you use t:header or t:Header. > -----Original Message----- > From: Angelo Chen [mailto:[EMAIL PROTECTED] > Sent: Thursday, October 18, 2007 1:19 PM > To: users@tapestry.apache.org > Subject: RE: Templates and t:body > > > Hi Jonathan, > > I tried your approach, but does not work, here is my steps: > > 1. create a Header.html in component directory, it has only one > line:<h2>hi > my heading</h2> > 2. I use it in my start.html: > > <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"> > <head> > <title>Start Page</title> > </head> > <body> > <h1>Start Page</h1> > <t:Header /> > </body> > </html> > > It complains:Unable to resolve component type 'Header' to a component > class > name. > > Anything I'm missing here? Thanks, > A.C. > > > Jonathan Barker wrote: > > > > Sorry, I only answered half of your question. > > > > Including your standard header into hello.tml would be something like: > > > > <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"> > > <head> > > <title>My Tapestry Application</title> > > </head> > > <body> > > <t:header /> > > My Page Specific Content > > </body> > > </html> > > > > > >> -----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] > > > > > > > > -- > View this message in context: http://www.nabble.com/Templates-and- > t%3Abody-tf4647900.html#a13279344 > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > 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]