Dave Crossland wrote:
> Here is the snippet:
>
> <div class="randomimage">
> <a href="/"><img alt="This is a random image" height="100" width="600"
> src="/images/banners/
> <r:random>
> <r:random:option>banner1</r:random:option>
> <r:random:option>banner2</r:random:option>
> </r:random>
> .jpg" /></a>
> </div>
> 
> The output is:
> 
> <div class="rowbleed">
> <a href="/"><img alt="iMethod" height="275" width="600" src="/images/banners/
> 
> .jpg" /></a>
> </div>
> 
> And yes I have cleared the page cache.

Ok, the extra new lines are the problem. Radiant tags observe whitespace 
(that is, they won't trim extra newlines off for you). Instead of the 
what you had, try this:

   <div class="randomimage">
   <a href="/"><img alt="This is a random image" height="100" width="600"
   src="/images/banners/<r:random>
   <r:option>banner1</r:option>
   <r:option>banner2</r:option>
   </r:random>.jpg" /></a>
   </div>

This should output:

   <div class="randomimage">
   <a href="/"><img alt="This is a random image" height="100" width="600"
   src="/images/banners/banner1.jpg" /></a>
   </div>

See the difference? Oh, and you don't have to prefix the <r:option /> 
tags with "random:".

--
John Long
http://wiseheartdesign.com
_______________________________________________
Radiant mailing list
[email protected]
http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to