PHPackages                             nliautaud/pico-pages-list - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. nliautaud/pico-pages-list

ActivePico-plugin[Utility &amp; Helpers](/categories/utility)

nliautaud/pico-pages-list
=========================

A pages lists plugin for Pico CMS, with nested pages, pages filtering and HTML navigation.

0.4.1(7y ago)131838MITPHPPHP &gt;=5.4.0

Since Jul 4Pushed 3y ago2 watchersCompare

[ Source](https://github.com/nliautaud/pico-pages-list)[ Packagist](https://packagist.org/packages/nliautaud/pico-pages-list)[ Docs](http://picocms.org/)[ RSS](/packages/nliautaud-pico-pages-list/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (4)DependenciesVersions (3)Used By (0)

Pico Pages List
===============

[](#pico-pages-list)

A flat and nested pages lists plugin for [Pico CMS](http://picocms.org).

- `{{ nested_pages }}` array
- nested or flat html navigations
- pages links and directories structures
- versatile html/css for dropdown menus, single-line breadcrumbs...
- `exclude` and `only` pages filters

[![Examples](examples/capture.png)](http://pico.nliautaud.fr/PicoPagesList)

Installation
------------

[](#installation)

Copy `PicoPagesList.php` to the `plugins` directory of your Pico Project.

Usage
-----

[](#usage)

Create a nested HTML navigation tree with :

```
{{ nested_pages | navigation }}
```

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.

```
{{ pages | navigation }} // output a flat pages list
```

Filtering
---------

[](#filtering)

The plugin create two additionnal Twig filters, `exclude()` and `only()`, that filters the given pages array (`pages` or `nested_pages`) by paths.

```
pages | exclude('path/')    // exclude the page located under "path/"
pages | only('path/')       // return only the page located at "path/"
```

Use the leading slath to target index pages or not.

```
pages | exclude('sub/dir/')     // exclude the page located under "sub/dir/", but not "sub/dir" (index)
pages | exclude('sub/dir')      // exclude "sub/dir" (index) and pages located under "sub/dir/"
```

You can specify multiple paths at once by using multiple arguments.

```
exclude('sub/dir', 'page')
only('sub/dir', 'page')
```

### Styling

[](#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.

```

    A cool page

    Sub-page is coming

        The choosen one

        category

            A page

    untitled

```

```
.foo-item { /* an item named "foo-item" */ }
.foo-item > a { /* the link of a page named "foo-item" */ }
.foo-item > span { /* the name of a directory named "foo-item"  */ }
.foo-item > ul { /* the childs of "foo-item" */ }
.foo-item > ul ul { /* the deep childs of "foo-item" */ }

.is-page { /* the pages, with links */ }
.is-directory { /* the directories, with simple names */ }
.is-current { /* the current page */ }
.is-active { /* the items in the path of the current page */ }
.has-childs { /* the items with childs */ }
```

As a simple example, you may show sub-pages only if their parent is active :

```
.mymenu li.is-page:not(.is-active) ul {
    display: none;
}
```

Custom loop
-----------

[](#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 :

```
{% macro menu(items) %}

  {% for name,item in items %}

      {% if item.url %}
        {{ item.title }} : {{ item.description }}
      {% else %}
        {{ name }}
      {% endif %}
      {% if item._childs %}
        {% import _self as macros %}
        {{ macros.menu(item._childs) }}
      {% endif %}

  {% endfor %}

{% endmacro %}

{% import _self as macros %}
{{ macros.menu(nested_pages) }}
```

Settings
--------

[](#settings)

The lists are sorted according to the default settings in Pico `config.php`.

```
pages_order_by: date
pages_order: desc
```

###  Health Score

28

↑

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~309 days

Total

2

Last Release

2561d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/66c5f87508593151e15c82a4d119377c7eb3d8257460bd6aff72b8ff8ad94ea3?d=identicon)[nliautaud](/maintainers/nliautaud)

---

Top Contributors

[![nliautaud](https://avatars.githubusercontent.com/u/761761?v=4)](https://github.com/nliautaud "nliautaud (49 commits)")[![jheimbach](https://avatars.githubusercontent.com/u/1742040?v=4)](https://github.com/jheimbach "jheimbach (6 commits)")[![PhrozenByte](https://avatars.githubusercontent.com/u/920356?v=4)](https://github.com/PhrozenByte "PhrozenByte (3 commits)")[![matschundbrei](https://avatars.githubusercontent.com/u/9265808?v=4)](https://github.com/matschundbrei "matschundbrei (1 commits)")

---

Tags

html-navigationnavigation-treenested-pagespico-cmspico-pluginpicocmspluginpicopicocmspicocms-pluginpico-pages-list

### Embed Badge

![Health badge](/badges/nliautaud-pico-pages-list/health.svg)

```
[![Health](https://phpackages.com/badges/nliautaud-pico-pages-list/health.svg)](https://phpackages.com/packages/nliautaud-pico-pages-list)
```

###  Alternatives

[picocms/pico

Pico is a flat file CMS, this means there is no administration backend and database to deal with. You simply create .md files in the "content" folder and that becomes a page.

3.9k37.8k11](/packages/picocms-pico)[picocms/pico-composer

Pico is a flat file CMS, this means there is no administration backend and database to deal with. You simply create .md files in the "content" folder and that becomes a page.

2020.6k](/packages/picocms-pico-composer)[picocms/pico-theme

This is Pico's official default theme. Pico is a stupidly simple, blazing fast, flat file CMS.

1232.2k2](/packages/picocms-pico-theme)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
