Skip to content
This repository has been archived by the owner on Mar 29, 2018. It is now read-only.
/ philePageShuffle Public archive

Create a new template variable, pages_shuffled, which contains a randomized version of pages

License

Notifications You must be signed in to change notification settings

PhileCMS/philePageShuffle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Note: This repository is abandonded. Use https://github.com/PhileCMS/phileTwigFilters instead.

philePageShuffle

Creates a new template variable, pages_shuffled, which contains a randomized array of pages.

1.1 Installation (composer)

php composer.phar require phile/pageshuffle:*

1.2 Installation (Download)

  • Install the latest version of Phile
  • Clone this repo into plugins/phile/pageShuffle

2. Activation

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);

Usage

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>

About

Create a new template variable, pages_shuffled, which contains a randomized version of pages

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages