Re: T5: Best page templating strategy

2007-04-10 Thread Howard Lewis Ship
This could also be written as: Block onBeforeRenderBody() { return _sidebar; } On 4/10/07, Yann Ramin <[EMAIL PROTECTED]> wrote: Just figured out you can return the block in a render stage to get it to render. Deceptively simple, but the docs (from my reading), didn't mention it. @Bef

Re: T5: Best page templating strategy

2007-04-10 Thread Yann Ramin
Just figured out you can return the block in a render stage to get it to render. Deceptively simple, but the docs (from my reading), didn't mention it. @BeforeRenderBody Block doSidebar() { return _sidebar; } Yann Ramin wrote: I got a good st

Re: T5: Best page templating strategy

2007-04-10 Thread Yann Ramin
I got a good start on this, but still missing something fundamental. In Page.java, I have the Sidebar component. In Page.html, I pass the component in a parameter In Layout.java I have a sidebar block @Parameter(required=true) private Block _sidebar; What I can't figure out is how t

Re: T5: Best page templating strategy

2007-04-10 Thread Howard Lewis Ship
If the sidebar really changes for each page, then it can be a Block parameter to the layout component. This will allow the layout component to control where, within its templates, the sidebar appears. Check out the t:parameter documentation. On 4/10/07, Stephane PAQUET <[EMAIL PROTECTED]> wrote:

Re: T5: Best page templating strategy

2007-04-10 Thread Stephane PAQUET
Just one question, why don't you use a CSS layout + ASSET in stead of component (this does not apply to the sidebar). Rgds, SP On Apr 10, 2007, at 8:28 AM, Yann Ramin wrote: I'm using T5 to do some experimental testing, creating some mockup applications to teach me more about the framework.

T5: Best page templating strategy

2007-04-09 Thread Yann Ramin
I'm using T5 to do some experimental testing, creating some mockup applications to teach me more about the framework. My question is, how do you best handle multi-part layouts? For instance, a Layout can be composed of a Body and a Sidebar. The Sidebar can be a component. My current approach is