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

Abandoned → [contao-community-alliance/nested-menu](/?search=contao-community-alliance%2Fnested-menu)ArchivedContao-module

bit3/contao-nested-menu
=======================

Nested menus for Contao OpenSource CMS

1.1.3(12y ago)02.1k1LGPL-3.0+PHPPHP &gt;=5.3

Since Feb 19Pushed 12y ago1 watchersCompare

[ Source](https://github.com/bit3archive/contao-nested-menu)[ Packagist](https://packagist.org/packages/bit3/contao-nested-menu)[ Docs](http://bit3.de)[ RSS](/packages/bit3-contao-nested-menu/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (12)Used By (1)

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

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

[![Build Status](https://camo.githubusercontent.com/8d5151a76b5564ada82a131ccc9c54e450639c7d39cd321032b12bc359b27877/68747470733a2f2f7472617669732d63692e6f72672f626974332f636f6e74616f2d6e65737465642d6d656e752e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/bit3/contao-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 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 97.4% 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 ~30 days

Recently: every ~54 days

Total

11

Last Release

4531d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4e61f74ea186c1e79e072b2974ccdeef39414730476d5a8adac501eb9449b2a3?d=identicon)[tril](/maintainers/tril)

---

Top Contributors

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

---

Tags

menucontao

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[dklemmt/contao_dk_mmenu

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

1578.7k](/packages/dklemmt-contao-dk-mmenu)[codefog/contao-mobile_menu

mobile\_menu extension for Contao Open Source CMS

1439.7k](/packages/codefog-contao-mobile-menu)

PHPackages © 2026

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