Note: This repository is abandonded. Use https://github.com/PhileCMS/phileTwigFilters instead.
Creates a new template variable, pages_shuffled, which contains a randomized array of pages.
php composer.phar require phile/pageshuffle:*
- Install the latest version of Phile
- Clone this repo into
plugins/phile/pageShuffle
After you have installed the plugin. You need to add the following line to your config.php
file:
$config['plugins']['phile\\pageShuffle'] = array('active' => true);
This plugin exposes a new variable to templates called, pages_shuffled
. This array contains a shuffled (randomized) version of pages
.
<ul class="posts">
{% for page in pages_shuffled %}
<li><a href="{{ page.url }}">{{ page.title }}</a></li>
{% endfor %}
</ul>