Download the PHP package nliautaud/pico-pages-list without Composer
On this page you can find all versions of the php package nliautaud/pico-pages-list. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nliautaud/pico-pages-list
More information about nliautaud/pico-pages-list
Files in nliautaud/pico-pages-list
Package pico-pages-list
Short Description A pages lists plugin for Pico CMS, with nested pages, pages filtering and HTML navigation.
License MIT
Homepage http://picocms.org/
Rated 5.00 based on 1 reviews
Informations about the package pico-pages-list
Pico Pages List
A flat and nested pages lists plugin for Pico CMS.
{{ nested_pages }}
array- nested or flat html navigations
- pages links and directories structures
- versatile html/css for dropdown menus, single-line breadcrumbs...
exclude
andonly
pages filters
Installation
Copy PicoPagesList.php
to the plugins
directory of your Pico Project.
Usage
Create a nested HTML navigation tree with :
The nested navigation will look like that :
- [A cool page]()
- [Sub-page is coming]()
- [The choosen one]()
- category
- [A page]()
- [untitled]()
The global nested_pages
and the filter navigation
render an HTML navigation. Works on {{ pages }}
too.
Filtering
The plugin create two additionnal Twig filters, exclude()
and only()
, that filters the given pages array (pages
or nested_pages
) by paths.
Use the leading slath to target index pages or not.
You can specify multiple paths at once by using multiple arguments.
Styling
The default html output is a clean nested list with extra classes that provides the possibility to build hierarchical navigations and to target specific pages and directories.
As a simple example, you may show sub-pages only if their parent is active :
Custom loop
The {{ nested_pages }}
global is an array of pages, similar to {{ pages }}
, where sub-pages are nested into _childs
.
You may want a recursive Twig template or macro to walk trough it, for example :
Settings
The lists are sorted according to the default settings in Pico config.php
.