PHPackages                             gibbs/phile-sub-navigation - 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. gibbs/phile-sub-navigation

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

gibbs/phile-sub-navigation
==========================

Generates a philecms nested hierarchy

1.0.1(11y ago)5632[2 issues](https://github.com/Gibbs/phileSubNavigation/issues)MITPHP

Since May 25Pushed 11y ago2 watchersCompare

[ Source](https://github.com/Gibbs/phileSubNavigation)[ Packagist](https://packagist.org/packages/gibbs/phile-sub-navigation)[ Docs](http://dangibbs.co.uk/)[ RSS](/packages/gibbs-phile-sub-navigation/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (3)Used By (0)

PhileCMS Sub Navigation
=======================

[](#philecms-sub-navigation)

A [PhileCMS](https://github.com/PhileCMS/Phile) plugin that generates a hierarchy tree that can be used to make nested navigation menus.

1. Installation
---------------

[](#1-installation)

**Install via composer**

```
composer require "gibbs/phile-sub-navigation:1.*"
```

**Install via git**

Clone this repository from the `phile` directory into `plugins/gibbs/phileSubNavigation`. E.g:

```
git clone git@github.com:Gibbs/phileSubNavigation.git plugins/gibbs/phileSubNavigation
```

**Manual Install**

Download and extract the contents into: `plugins/gibbs/phileSubNavigation`

2. Plugin Activation
--------------------

[](#2-plugin-activation)

Activate the plugin in your `config.php` file:

```
$config['plugins']['gibbs\\phileSubNavigation'] = array('active' => true);
```

3. Parameters
-------------

[](#3-parameters)

This plugin returns a variable named `navigation`. Each item in the site hierarchy has the following parameters:

- `active` - True when the item is the current page
- `level` - How deep the current page is nested.
- `meta` - The associated pages meta information
- `path` - The current path e.g. `blog/post`
- `parent` - The pages parent
- `uri` - An alias of `path`
- `url` - The full URL to the page

4. Example Usage
----------------

[](#4-example-usage)

To be flexible NO HTML is generated by this plugin - that is the responsibility of the template engine you are using.

More examples are available on the [wiki](https://github.com/Gibbs/phileSubNavigation/wiki)

Children of a particular path, for example `/blog/` can be used by referencing the children key.

**Twig - List /blog/ children**

```

{% for item in navigation.blog.children %}

		{{ item.meta.title }}

{% endfor %}

```

**Twig - List /blog/archive/ children**

```

{% for item in navigation.blog.children.archive.children %}
	{% if item.active %}

	{% else %}

	{% endif %}
		{{ item.meta.title }}

{% endfor %}

```

**Twig - Entire site hierarchy example**

```

{% macro sub_navigation(navigation) %}
	{% import _self as macros %}
	{% for item in navigation %}

			{{ item.meta.title }}
			{% if item.children %}

					{{ macros.sub_navigation(item.children) }}

			{% endif %}

	{% endfor %}
{% endmacro %}

{% import _self as macros %}
{{ macros.sub_navigation(navigation) }}
```

To debug the plugin output set `'print' => true` inside the plugins `config.php` file.

4. Caching
----------

[](#4-caching)

Caching is disabled by default and depends on `phile\\simpleFileDataPersistence` (enabled by default).

To enable caching edit the plugins `config.php` file and set *cache* to *true*.

**NOTE:** Caching will cause some parameters such as `active` to stop working.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance12

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 90% 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 ~43 days

Total

2

Last Release

4323d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/911b7305e88455fc4fa1958a4d97d3f5a3f6b94a451e98b60f22a1d07f61c8a2?d=identicon)[gibbs](/maintainers/gibbs)

---

Top Contributors

[![gibbs](https://avatars.githubusercontent.com/u/1873895?v=4)](https://github.com/gibbs "gibbs (9 commits)")[![Xaerxess](https://avatars.githubusercontent.com/u/121382?v=4)](https://github.com/Xaerxess "Xaerxess (1 commits)")

---

Tags

cmsnavigationphilephilecms

### Embed Badge

![Health badge](/badges/gibbs-phile-sub-navigation/health.svg)

```
[![Health](https://phpackages.com/badges/gibbs-phile-sub-navigation/health.svg)](https://phpackages.com/packages/gibbs-phile-sub-navigation)
```

###  Alternatives

[verbb/navigation

Create navigation menus for your site.

90683.7k17](/packages/verbb-navigation)[studioespresso/craft-navigate

Navigation plugin for Craft CMS

2642.6k1](/packages/studioespresso-craft-navigate)

PHPackages © 2026

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