On Wed, May 13, 2009 at 8:07 AM, N. Turnage <[email protected]> wrote:
> I could have sworn that I had seen an extension that would either load a
> random image or rotate images banner-style, but I cannot find it. I need to
> to be able to set a random background image for a div each time the page is
> loaded/re-loaded. Does anybody know what I am talking about? I thought I had
> seen an extension that would do this one time, but with the serious lack of
> sleep I am experiencing I cannot find it.
not sure about any particular extension but the random/options radius
tags are a part of radiant core.
<r:random>
<r:option>a</r:option>
<r:option>b</r:option>
<r:option>c</r:option>
</r:random>
and since 0.6.9 (i think) the options can be dynamic so if you had
page_attachments installed and a bunch of images attached to a banner
page you could do something like:
<r:find url='/banners'>
<r:random>
<r:attachment:each>
<r:option><img src='<r:url/>'></r:option>
</r:attachment:each>
</r:random>
</r:find>
_______________________________________________
Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant