Page 1 of 1

two "same" random background image

Posted: Sun May 20, 2007 8:30 pm
by firfelin
Hi,

My english is crappy, so I'll try to explain slowly... :-\

Currently I have one image repeated for the body background and one for the header

I would like to change them randomly but related (image_body_1 with image_header_1 etc...)

For  a normal static html-css site I found this:

Code: Select all

<?php
$numero = rand(1, 5);
?> 

<div id="body" style="background: url(folder_1/image<?php echo $numero;?>.gif)">
<div id="header" style="background: url(folder_2/image<?php echo $numero;?>.gif)">
</div>
</div>

But I dont know how to integrate it in my  cmsms template...

Thanks in advance for your help