PHPackages                             contao-community-alliance/nested-menu - 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. contao-community-alliance/nested-menu

ActiveContao-module[Utility &amp; Helpers](/categories/utility)

contao-community-alliance/nested-menu
=====================================

Nested menus for Contao OpenSource CMS

1.1.5(10y ago)01.4k3[2 issues](https://github.com/contao-community-alliance/nested-menu/issues)[1 PRs](https://github.com/contao-community-alliance/nested-menu/pulls)2LGPL-3.0+PHPPHP &gt;=5.3

Since Nov 6Pushed 9y ago3 watchersCompare

[ Source](https://github.com/contao-community-alliance/nested-menu)[ Packagist](https://packagist.org/packages/contao-community-alliance/nested-menu)[ Docs](http://c-c-a.org)[ RSS](/packages/contao-community-alliance-nested-menu/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (4)Versions (4)Used By (2)

Nested menus for the Contao OpenSource CMS
==========================================

[](#nested-menus-for-the-contao-opensource-cms)

[![Version](https://camo.githubusercontent.com/2babbc2956e681c2a8154ddad2a6a778aab8f73db24c6c48a1b5bd7af4465576/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f6e74616f2d636f6d6d756e6974792d616c6c69616e63652f6e65737465642d6d656e752e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/contao-community-alliance/nested-menu)[!\[Stable Build Status\](http://img.shields.io/travis/contao-community-alliance/nested-menu/master.svg?style=flat-square&amp;label=stable build)](https://travis-ci.org/contao-community-alliance/nested-menu)[!\[Upstream Build Status\](http://img.shields.io/travis/contao-community-alliance/nested-menu/develop.svg?style=flat-square&amp;label=dev build)](https://travis-ci.org/contao-community-alliance/nested-menu)[![License](https://camo.githubusercontent.com/9d9c484e084fca32add6ae16e5a719f011a9b9e4075aa5cb8edbf6d6e958f617/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f636f6e74616f2d636f6d6d756e6974792d616c6c69616e63652f6e65737465642d6d656e752e7376673f7374796c653d666c61742d737175617265)](http://spdx.org/licenses/LGPL-3.0+)[![Downloads](https://camo.githubusercontent.com/65eee01616cefa0c9bf68693967cbf8d140bf4169fe892118cda78404bd7b921/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636f6e74616f2d636f6d6d756e6974792d616c6c69616e63652f6e65737465642d6d656e752e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/contao-community-alliance/nested-menu)

The benefit of *nested menu* is to reduce the count of backend menu items and group them into a sub menu.

Define nested menu items
------------------------

[](#define-nested-menu-items)

First you need a navigation setup with a lot of items.

```
$GLOBALS['BE_MOD']['my'] = array(
	'entry1' => array(
		'tables' => array('table1'),
	),
	'entry2' => array(
		'tables' => array('table2'),
	),
	'entry3' => array(
		'tables' => array('table3'),
	),
	'entry4' => array(
		'tables' => array('table4'),
	),
	'entry5' => array(
		'tables' => array('table5'),
	),
	'entry6' => array(
		'tables' => array('table6'),
	),
	'entry7' => array(
		'tables' => array('table7'),
	),
	'entry8' => array(
		'tables' => array('table8'),
	),
	'entry9' => array(
		'tables' => array('table9'),
	),
);
```

Now you have to define, which item will be nested into another item.

```
$GLOBALS['BE_MOD']['my'] = array(
	'entry1' => array(
		'tables' => array('table1'),
	),
	'entry2' => array(
		'tables' => array('table2'),
	),
	'entry3' => array(
		'tables' => array('table3'),
	),
	'entry4' => array(
		'tables' => array('table4'),
	),
	'entry5' => array(
		'nested' => 'grouped_entries',
		'tables' => array('table5'),
	),
	'entry6' => array(
		'nested' => 'grouped_entries',
		'tables' => array('table6'),
	),
	'entry7' => array(
		'nested' => 'grouped_entries',
		'tables' => array('table7'),
	),
	'entry8' => array(
		'nested' => 'grouped_entries',
		'tables' => array('table8'),
	),
	'entry9' => array(
		'nested' => 'grouped_entries',
		'tables' => array('table9'),
	),
);
```

Now a **virtual** structure will be created, that look like this:

```
$GLOBALS['BE_MOD']['my'] = array(
	'entry1' => array(
		'tables' => array('table1'),
	),
	'entry2' => array(
		'tables' => array('table2'),
	),
	'entry3' => array(
		'tables' => array('table3'),
	),
	'entry4' => array(
		'tables' => array('table4'),
	),
	'grouped_entries' => array(
		'callback' => 'NestedMenuController',
	),
);
```

Keep in mind, the entries `entry5` till `entry9` are only hidden from the user.

The new item `grouped_entries` now provide a navigation listing, similar to the *old* navigation listing, known from the Contao 2 backend startpage.

It is also possible to make different groups in the sub menu, just add a `:group-name` to the `nested` key.

```
$GLOBALS['BE_MOD']['my'] = array(
	'entry1' => array(
		'tables' => array('table1'),
	),
	'entry2' => array(
		'tables' => array('table2'),
	),
	'entry3' => array(
		'tables' => array('table3'),
	),
	'entry4' => array(
		'tables' => array('table4'),
	),
	'entry5' => array(
		'nested' => 'grouped_entries:group1',
		'tables' => array('table5'),
	),
	'entry6' => array(
		'nested' => 'grouped_entries:group1',
		'tables' => array('table6'),
	),
	'entry7' => array(
		'nested' => 'grouped_entries:group2',
		'tables' => array('table7'),
	),
	'entry8' => array(
		'nested' => 'grouped_entries:group2',
		'tables' => array('table8'),
	),
	'entry9' => array(
		'nested' => 'grouped_entries:group3',
		'tables' => array('table9'),
	),
);
```

Now `entry5` and `entry6` will be grouped, `entry7` and `entry8` will be grouped and also `entry9` get an own group.

Translations
------------

[](#translations)

Every sub menu group require a language key in the `$GLOBALS['TL_LANG']['MOD']` array, equals to the group name.

```
$GLOBALS['TL_LANG']['MOD']['grouped_entries:group1'] = 'Group 1';
$GLOBALS['TL_LANG']['MOD']['grouped_entries:group2'] = 'Group 2';
$GLOBALS['TL_LANG']['MOD']['grouped_entries:group3'] = 'Group 3';
```

Security
--------

[](#security)

Because nested menu is just a visual modification, you can grant or limit access to every single menu item, including the grouped item itself. You will not miss all any permissions Contao provide.

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 73.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 ~144 days

Total

2

Last Release

3749d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/44649522?v=4)[xtra](/maintainers/xtra)[@xtra](https://github.com/xtra)

![](https://avatars.githubusercontent.com/u/10211934?v=4)[Chibineko](/maintainers/Chibineko)[@chibineko](https://github.com/chibineko)

![](https://avatars.githubusercontent.com/u/8189209?v=4)[netzmacht](/maintainers/netzmacht)[@netzmacht](https://github.com/netzmacht)

![](https://avatars.githubusercontent.com/u/8672569?v=4)[California College of Arts](/maintainers/cca)[@cca](https://github.com/cca)

---

Top Contributors

[![tristanlins](https://avatars.githubusercontent.com/u/343404?v=4)](https://github.com/tristanlins "tristanlins (38 commits)")[![dmolineus](https://avatars.githubusercontent.com/u/1186266?v=4)](https://github.com/dmolineus "dmolineus (10 commits)")[![baumannsven](https://avatars.githubusercontent.com/u/2493263?v=4)](https://github.com/baumannsven "baumannsven (3 commits)")[![dominikzogg](https://avatars.githubusercontent.com/u/1011217?v=4)](https://github.com/dominikzogg "dominikzogg (1 commits)")

---

Tags

menucontao

### Embed Badge

![Health badge](/badges/contao-community-alliance-nested-menu/health.svg)

```
[![Health](https://phpackages.com/badges/contao-community-alliance-nested-menu/health.svg)](https://phpackages.com/packages/contao-community-alliance-nested-menu)
```

###  Alternatives

[codefog/contao-mobile_menu

mobile\_menu extension for Contao Open Source CMS

2140.4k](/packages/codefog-contao-mobile-menu)[dklemmt/contao_dk_mmenu

Implementation of mmenu as an extension for the Contao Open Source CMS.

1780.9k](/packages/dklemmt-contao-dk-mmenu)

PHPackages © 2026

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