[Radiant] nested layouts?
dror tirosh
dtirosh at gmail.com
Fri Sep 1 10:46:48 CDT 2006
Can you not have the same result simply by having a "body" page_part in the
\, and then not have a "body" page_part in the actual pages. Radiant will
look for the page_part either in the page you are trying to show or in its
parent.
If you need a different "body" for your root, then just create a hidden page
with the "\" slug put your template in the "body" page_part, and create your
pages under tis hidden page.
Dror
On 9/1/06, Sean Cribbs <seancribbs at gmail.com> wrote:
>
> 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
> >
>
>
> _______________________________________________
> 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/468c0fc8/attachment.html
More information about the Radiant
mailing list