Ques/Help How to combine two variables !?

V

valdet

Guest
I have a pretty basic image rotator in a sidebar widget which pulls images on a random order through the rand(1,20) function.
It is very similar to this Xenforo resource

Code:

Code:
<xf:set var="$image.1">image1.jpg</xf:set>
<xf:set var="$image.2">image.2.png</xf:set>
<xf:set var="$image.3">image3.jpg</xf:set>
<xf:set var="$image.4">image.4.png</xf:set>

I display them on the widget by a simple call as below

Code:

<div><img src="{$image.{{ (rand(1,20)) }}|raw}" /></div>

What I would like...

Read more

Continue reading...