[Radiant] nested layouts?
Sean Cribbs
seancribbs at gmail.com
Fri Sep 1 09:04:46 CDT 2006
Ollivier,
Did you consider creating two layouts, one plain and one two-column? I
understand it's not the prettiest answer, but the 80% rule might apply in
this case.
Another alternative would be to use some branching tags like "if_content" or
"if_url" to determine which sub-layout to use, and use a snippet to
encapsulate that sub-layout piece.
Sean Cribbs
seancribbs.com
On 9/1/06, Ollivier Robert <keltia at gmail.com> wrote:
>
> 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 -
> _______________________________________________
> Radiant mailing list
> Radiant at lists.radiantcms.org
> http://lists.radiantcms.org/mailman/listinfo/radiant
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.radiantcms.org/pipermail/radiant/attachments/20060901/a5591d03/attachment.html
More information about the Radiant
mailing list