[Radiant] nested layouts?

Ollivier Robert keltia at gmail.com
Fri Sep 1 08:57:55 CDT 2006


On 9/1/06, John W. Long <ng at johnwlong.com> wrote:
> I'm having trouble visualizing how that would work. Can you show me how
>    you would visualize a layout which used another layout?

I'm more looking at a way to render partials or template.

For the moment, I have

/ -- (layout: plain)
   |
  +-- page1
   |       |
   |      +-- body (layout: two-colums)
   |      +-- left
   |      +-- main
   |
  +-- page2
   |       |
   |      +-- body (layout: two-colums)
   |      +-- left
   |      +-- main

If I need to add a page that will look like page1 or page2, I have to
duplicate the "body" part.

What I'd like to say is:  here is that page with layout "foo" but of
type "bar", being of type "bar" means that it will have two parts, one
named "left" and the other "main".

i.e. don't duplicate the code in "body".

The analogy being in Rails, you have the layout and partials.

Is that better?

Maybe I'm misunderstanding the radiant way to do it...
-- 
Ollivier Robert -



More information about the Radiant mailing list