Dynamic page header

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Dynamic page header

Will-3
Hi I'm new to Tapestry.

I have a border component that looks like this:

<html>
<body jwcid="@Body">
<table>
 <tr valign="top">
  <td><span jwcid="@Logo"/></td>
   <td>
    <span jwcid="@Header"/>
    <span jwcid="@PageHeader"/>
   </td>
 </tr>
 <tr valign="top">
  <td><span jwcid="@Menu"/></td>
  <td><span jwcid="@RenderBody"/></td>
 </tr>
</table>
</body>
</html>

The problem I have is with the PageHeader component because every page 'could'
have a different page header (or no header).

What I would like is to specify in the .page declaration wich header to use
like this:

Page1.page
<page-specification>
 <description>PAGE1</description>

<component id="pageHeader" type="PageHeader">
 <static-binding name="pageHeader">HEADER1</static-binding>
</component>
</page-specification>

Page2.page
<page-specification>
 <description>PAGE2</description>

<component id="pageHeader" type="PageHeader">
 <static-binding name="pageHeader">HEADER2</static-binding>
</component>
</page-specification>

How can I do this? (I tried Block/RenderBlock but that didn't work...)

Hope someone can help me in the right direction.
Regards,
Will



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Dynamic page header

Hugo Palma
Try dynamic block component. I'm using it for exacly the same purpose.

http://www.behindthesite.com/blog/C1931765677/E1630021481/


Cheers

Hugo

Will wrote:

>Hi I'm new to Tapestry.
>
>I have a border component that looks like this:
>
><html>
><body jwcid="@Body">
><table>
> <tr valign="top">
>  <td><span jwcid="@Logo"/></td>
>   <td>
>    <span jwcid="@Header"/>
>    <span jwcid="@PageHeader"/>
>   </td>
> </tr>
> <tr valign="top">
>  <td><span jwcid="@Menu"/></td>
>  <td><span jwcid="@RenderBody"/></td>
> </tr>
></table>
></body>
></html>
>
>The problem I have is with the PageHeader component because every page 'could'
>have a different page header (or no header).
>
>What I would like is to specify in the .page declaration wich header to use
>like this:
>
>Page1.page
><page-specification>
> <description>PAGE1</description>
>
><component id="pageHeader" type="PageHeader">
> <static-binding name="pageHeader">HEADER1</static-binding>
></component>
></page-specification>
>
>Page2.page
><page-specification>
> <description>PAGE2</description>
>
><component id="pageHeader" type="PageHeader">
> <static-binding name="pageHeader">HEADER2</static-binding>
></component>
></page-specification>
>
>How can I do this? (I tried Block/RenderBlock but that didn't work...)
>
>Hope someone can help me in the right direction.
>Regards,
>Will
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [hidden email]
>For additional commands, e-mail: [hidden email]
>
>
>  
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]