Hi Prism.

I'm not a radiant expert, but I think I might be able to help.

<r:children:each> can be used to gather information about each of the child
pages of a given parent page. The results are not necessarily random -- the
order of the child pages can be specified in attributes of
the <r:children:each> tag. However, you could generate a list of links like
this:

<r:find url="parent_page">
<ul>
<r:children:each>
  <li><r:link other_attributes... /></li>
</r:children:each>
</ul>
</r:find>

The <r:random> tag, on the other hand, randomly selects 1 item from a
collection of items specified by <r:option> tags. Here's a simple example
of how I used it to have a random banner image displayed on a Christmas
event page:

<r:random>
<r:option><p><r:assets:image title="christmas-1" size="original"
/></p></r:option>
<r:option><p><r:assets:image title="christmas-2" size="original"
/></p></r:option>
<r:option><p><r:assets:image title="christmas-3" size="original"
/></p></r:option>
<r:option><p><r:assets:image title="christmas-4" size="original"
/></p></r:option>
</r:random>

When someone visits the page, they will see one of the "christmas-x"
images. The next time, it might be a different one.

Hope this helps.
--
marshal


On Tue, Dec 11, 2012 at 11:32 PM, prism <ctang.1...@gmail.com> wrote:

> Hi,
>
> I want to generate a list of links pointing to articles that are randomly
> generated from <r:children:each>.   I looked at the link-roll extension.  I
> don't think that's the right extension.
>
> If there's no extension for this, I'm assuming I would use the <r: random>
> tag?  I don't know goes in between <r:option></r:option>.
>
> Thanks if anyone can clarify how I'm suppose to be utilizing these two
> tags to generate the random URLs.
>
>

Reply via email to