[Radiant] <r:random> and page children

Erik Mallinson erik at bamboomoon.org
Wed Sep 13 16:43:15 CDT 2006


Ah. So something like this? If such a thing would work.

<r:random limit="1">
  <r:children:each>
    <r:option><r:title /></r:option>
  </r:children:each>
</r:random>


On 9/13/06, Giovanni Intini <intinig at gmail.com> wrote:
>
> The code you wrote should grab the title of the first child (in a list
> made by all the children ordered in ascending order by published_at).
>
> 2006/9/13, Erik Mallinson < erik at bamboomoon.org>:
>
> > Does this work?
> > <r:children:each limit="1">
> >   <r:random>
> >     <r:option><r:title /></r:option>
> >   </r:random>
> > </r:children:each>
> >
> > That would be grabbing one random title from children pages, correct?
> > I haven't tried it myself, so I might be wrong.
> >
> >
> > Erik Mallinson
> >
> >
> > On 9/13/06, Giovanni Intini <intinig at gmail.com> wrote:
> > >
> > > I tried to get a random child's title from a page using this code, but
> > it doesn't work because it gives the title of the current page and not of
> > the child. Is there a way to get a random page?
> > >
> > > <r:random>
> > >   <r:children:each>
> > >     <r:option><r:title /></r:option>
> > >   </r:children:each>
> > > </r:random>
> > >
> > >
> > > _______________________________________________
> > > Radiant mailing list
> > > Post:   Radiant at lists.radiantcms.org
> > > Search: http://radiantcms.org/mailing-list/search/
> > > Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
> > >
> > >
> > _______________________________________________
> > Radiant mailing list
> > Post:   Radiant at lists.radiantcms.org
> > Search: http://radiantcms.org/mailing-list/search/
> > Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
> >
>
>
> _______________________________________________
> Radiant mailing list
> Post:   Radiant at lists.radiantcms.org
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.radiantcms.org/pipermail/radiant/attachments/20060913/0dacd79c/attachment.html


More information about the Radiant mailing list