Jump to content

Rotating Banner that works in vairline skin


RocketRod

Recommended Posts

What I usually do is create a php script that choses a random image on page load, instead of a slider. A slider takes the attention away from the important part of the webpage, in my opinion. Here's the code (if you want it to show up on every webpage, put it in 'layout.tpl' or 'core_navigation.tpl'):

   <?php
 $rotate[] = "<img src='/lib/skins/YOURSKINFOLDER/IMAGEPATH'/>";
 $rotate[] = "<img src='/lib/skins/YOURSKINFOLDER/IMAGEPATH'/>";	 
 $number = rand(0, sizeof($rotate) - 1);
 echo $rotate[$number];
   ?>

Let me know if you have any questions :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...