Page List template for random display

Permalink 1 user found helpful
I have been trying to edit the clean page list block template from jordanlev so that my page list would show in a random order. Link:https://github.com/jordanlev/c5_clean_block_templates/blob/master/pa...

After reading up on the forums, especially this post:
http://www.concrete5.org/community/forums/customizing_c5/random-pag...
and some trial and error, I got it to work.

This may be super simple for the advanced concrete5 coders out there, but maybe it can help someone like me.

I added
shuffle($pages);


here:

/******************************************************************************
* DESIGNERS: CUSTOMIZE THE PAGE LIST HTML STARTING HERE...
*/
shuffle($pages);
?>
<div class="ccm-page-list">
   <?php foreach ($pages as $page):
      // Prepare data for each page being listed...


Thanks to jordanlev for all of your great contributions!

If anyone knows of a better way to do this, please let me know.

-Foster

foster