OK. Let's say your template has a corresponding java class Site.java
which is a component.
This component has a parameter defined like

@Parameter(required=false)
@Property
private Block httpTags;

you can use this block in your Site.tml via <t:delegate to="httpTags"/>

To pass a block to the Site component you can either define the site
component within the nochachepage.java and pass it there or
you define the parameter in the nocachepage.tml:

<html t:type="site"
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";>
 <t:parameter name="httpTags">
     <meta ......>
    <meta .......>
</t:parameter>

BTW, that's < 5.1 syntax the new way would look like this (untested)

<html t:type="site"
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";
xmlns:p="tapestry:parameter">
 <p:httpTags>
     <meta ......>
    <meta .......>
</p:httpTags>

Hope that helps,
 Markus



On Tue, Jul 14, 2009 at 7:57 PM, learningtapestry<satish...@yahoo.com> wrote:
>
> Markus,
>
> Thanks for your response. Could you please provide a small example of how
> you can pass a block as a parameter into the template? Let's assume the
> template is Site.tml and the page is NoCachePage.java/NoCachePage.tml. Let's
> also assume I have the String parameter called "httpMetaTags" defined as a
> bunch of meta tags inside NoCachePage.java. The missing link for me is how
> to get the httpMetaTags into template.
>
>
> Markus Joschko wrote:
>>
>> In the same way you can also pass a block as a parameter that contains
>> arbitrary html (meta tags). The block can be defined in the page and
>> then be passed to the layout to render it where needed.
>>
>> Cheers,
>>  Markus
>>
>
> --
> View this message in context: 
> http://www.nabble.com/How-to-set-a-meta-header-tag-in-template--tp24436287p24484662.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
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to