You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "simon.robins" <si...@mac.com> on 2003/05/28 00:01:23 UTC

RenderBlock, RenderBody & Block

Hi all,

I'm currently developing a web site which has a number of different 
layouts. Currently I do this by rendering all the layouts, one after 
another, and then hiding and showing the selected layout using 
javascript. This is my first cut and obviously rather inefficient, also 
the different don't need to be dynamically selectable. I thought of a 
method using RenderBlock & Block to render the different Layout 
components but there seems to be no way to pass the content in the main 
web page up two levels to the RenderBody component. See below for a 
simplified arrangement. I think that I'm barking up the wrong tree here 
but I'm struggling to see a way to deal with this. Conditionals will 
not work either as I would need to make the start and stop tag 
conditional which will not validate. Any suggestions would be 
appreciated.

Simon

Home.html
-------------
<border jwcid="@Border">

	Some content here.

</border>

Border.html
--------------
<shell jwcid="@Shell" title="Some Title">

	<renderblock jwcid="@RenderBlock" block="ognl:layout"/>

</shell>

Layout1.html
------------
<renderbody jwcid="@RenderBody"/>