Download the PHP package richardhj/contao-knp-menu without Composer
On this page you can find all versions of the php package richardhj/contao-knp-menu. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download richardhj/contao-knp-menu
More information about richardhj/contao-knp-menu
Files in richardhj/contao-knp-menu
Package contao-knp-menu
Short Description Wrapper extension for knp-menu.
License MIT
Informations about the package contao-knp-menu
Contao KnpMenu
Provides Contao navigation modules as instances of KnpMenu.
This extension is stable and supported from Contao >=4.9 and will be integrated into the Contao Core at some time, see https://github.com/contao/contao/pull/3838.
Install
Via Composer
Usage
Retrieve a navigation module by its alias
For any navigation module in the Contao backend, you can define an alias. You can now retrieve this navigation by its alias:
You can also override some settings in the navigation module:
Use a default navigation
You don't necessarily need to create a navigation module. Just use the special key 'contao'
and configure it with the
third parameter where necessary.
Render a menu within a twig template
This extension was created to have maximum flexibility in rendering the navigation, thus the extension does not provide a base template. This is an example of retrieving and parsing a simple navigation within a twig template.
Development notes:
Code style:
All versions of contao-knp-menu with dependencies
contao/core-bundle Version ^4.9 || ^5.0
knplabs/knp-menu-bundle Version ^2.2. || ^3.0
symfony/config Version ^4.4 || ^5.0 || ^6.0
symfony/http-kernel Version ^4.4 || ^5.0 || ^6.0