Random banners in a page

Random banners in a page

Tuesday 11 November 2008 10:10:39 am - 1 reply

Author Message

André R.

Wednesday 12 November 2008 12:41:39 am

Output all the banners as hidden HTML and show one using javascript, this way you won't have to disable any cache or anything.

If there are a lot of banners then this wouldn't work (to much markup) and something should be done using a count fetch(to get total) and random operator to select banner using the random number as offset for the fetch (with limitation 1). This needs to be done outside any cache though.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

You must be logged in to post messages in this topic!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.