Periodic rotation of displayed articles

Author Message

martin k

Friday 14 October 2005 10:00:54 am

Hello,

I'm wondering if it's possible to make a periodic rotation of which article will be displayed once a user visits page. What I had in mind was to display a different "article of the day" chosen from all available articles.

I'm really not sure how to do this, didn't found any useful documentation. Took a look at cronjob.ini, but this only runs php-scripts?

Marko Žmak

Friday 14 October 2005 4:28:31 pm

Could you explain a little? Do you want that articles rotate in some order or randomly? If the sceond is the case, you coul just fetch a random article every time a page is displayed. A way to get a random nubmer is using eZ function for getting current time, together with the mod() function. Does this help you?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

martin k

Tuesday 18 October 2005 2:48:06 am

Yes, I wanted the articles to be rotated daily in some order. I think the right word for it is round-robin.

Anyway, we came up with a solution. My mate at work who is quite bright when it comes to databases made a solution using sql. He figured out that structure of the dynamic content was quite neatly arranged in the database. Since EZ uses article priority when it comes to which article to display, he just made a small script that rearranges priorities daily (runs from cron)

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