Select modules randomly

(7 votes, average 5.00 out of 5)

It’s easy to randomise your modules in Joomla – just set up MetaMod with the following PHP rule, and customise the “return” numbers to match the ids of the modules you want to use. Add more as appropriate.

$r = mt_rand(1,3); // get a random number: 1-3 inclusive
if ($r == 1) return 44;
if ($r == 2) return 88;
if ($r == 3) return 42;