If you would like to display the items in a random order, some modules provide a parameter you can set. But if a module lacks a randomize parameter, there is also a simple way to accomplish this with a single line of Smarty code.
Let's look at the News module
In the summary template you'll find the Smarty array variable $items which in fact contains all the news-items. You'll also recognize the line
{foreach from=$items item=entry} which is used to loop over the $items array.
To show the newsitems in a random order you just put this code right before the {foreach from=$items item=entry} statement
Code: Select all
{capture}{$items|@shuffle}{/capture}
Another example: Gallery
The Gallery module has a parameter action='showrandom', but if you just want the images of the specific subgallery shuffled, then you can use
Code: Select all
{capture}{$images|@shuffle}{/capture}
You can use this in every template where you see an array in the {foreach} or {section} tag.