7.0

Table Of Contents
A custom welcome page.
As the web site is created in PHP custom statements could be added based (for example based on the logged
on user). With a little help of Javascript (jQuery) you could create an image rotator to show images as slide
show. The following code creates a very simple image rotator. Note that we added display:none to the second
banner in order to initially hide the image.
<div id="content">
<div style="float:left;width:100%;">
<ul style="list-style-type: none;margin:0;" id="banners">
<li style="margin:0 0 1em 0;">
<img src="<? echo generateSkinLocation() ?>/banner-steps.png"/>
</li>
<li style="margin:0 0 1em 0;display:none;">
<img src="<? echo generateSkinLocation() ?>/banner-holiday.png"/>
</li>
</ul>
</div>
</div>
<script type="text/javascript">
$(document).ready(function() {
setInterval('rotateBanners()',5000);
});
function rotateBanners() {
var currentBanner = $('#banners li:visible');
var firstBanner = $('#banners li:first');
//Get next banner, when it reaches the end, rotate it back to the first banner
if(currentBanner.next().length){
currentBanner.next().fadeIn(1000);
currentBanner.hide();
} else {
firstBanner.fadeIn(1000);
currentBanner.hide();
}
}
</script>
Creating page exceptions - Modifying a page specific template file
Objectif Lune Inc. © 2010 45