Rotating Banner

From HAA Best Practices Wiki
Revision as of 16:10, 16 January 2009 by WikiSysop (talk | contribs) (New page: You can create a rotating page-top banner by editing the file: ..\templates\lavinya6\index.php (starting at the root of your web site) You can find the right section to edit by searching...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

You can create a rotating page-top banner by editing the file:

..\templates\lavinya6\index.php (starting at the root of your web site)

You can find the right section to edit by searching for "echo rand". The search will land you in the middle of a line that has been commented out (). This line includes the code:

<?php echo rand(1,2) ?>.jpg)

That code will randomly display images 1.jpg and 2.jpg. You could change it to display three images, say, by using:

<?php echo rand(1,3) ?>.jpg)">

To activeate this feature, uncomment the entire line and comment out the next line, which displays just 1.jpg.

See

Return to Design How-To's