Hi learning, use the if-Component in conjunction with a parameter for your layout-component that controlls the rendering. Your layout.tml would contain
<head> .... <t:if test="cachingDisabled"> <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"/> </t:if> .... </head> your Layout.java would contain @Parameter @Property(write=false) private boolean cachingDisabled; And in the tml of the page using the layout you would do <t:layout cachingDisabled="true"> ... Regards, nillehammer == http://www.winfonet.eu ----- original Nachricht -------- Betreff: How to set a meta header tag in template? Gesendet: Sa, 11. Jul 2009 Von: learningtapestry<satish...@yahoo.com> > > I am using tapestry version 5.1.0.3. I have a basic SiteLayout defined > > <html xmlns="http://www.w3.org/1999/xhtml" > xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"> > > <head>...some css styles...</head> > > <body> > ...some html goes here... > <t:body/> > </body> > > </html> > > Now as someone navigates my site, there is a particular page on which I > want > to turn off caching (because it always has to get the latest data from the > servers on that page). So, lets say I have a page "NoCachePage.java" and > "NoCachePage.tml" already coded. But the head tag is defined in the > Site.tml > template. How can I get my http meta tag <META HTTP-EQUIV="CACHE-CONTROL" > CONTENT="NO-CACHE"/> into the Site.tml's head element? > > I tried setting up @CleanUpRender inside NoCachePage.java and tried to > manipulate the DOM through the MarkupWriter. But it appears as if > MarkupWriter doesn't provide any method of adding an element under the > "head" html tag. > > How am I supposed to add the no-cache meta http tag into the head element > from my NoCachePage component? Please help. > -- > View this message in context: > http://www.nabble.com/How-to-set-a-meta-header-tag-in-template--tp24436287p2 > 4436287.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > --- original Nachricht Ende ---- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org