nucleos / menu-bundle
This bundle provides services for defining static menus for symfony applications.
Fund package maintenance!
core23
Opencollective
Ko-Fi
Other
Installs: 2 014
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 2
Forks: 1
Open Issues: 4
Type:symfony-bundle
Requires
- php: ^8.1
- knplabs/knp-menu: ^2.1 || ^3.1
- sonata-project/block-bundle: ^4.21 || ^5.0
- symfony/config: ^6.4 || ^7.0
- symfony/dependency-injection: ^6.4 || ^7.0
- symfony/expression-language: ^6.4 || ^7.0
- symfony/framework-bundle: ^6.4 || ^7.0
- symfony/http-kernel: ^6.4 || ^7.0
- symfony/translation-contracts: ^1.1 || ^2.0 || ^3.0
Requires (Dev)
- ergebnis/composer-normalize: ^2.0.1
- knplabs/knp-menu-bundle: ^2.3 || ^3.0
- symfony/browser-kit: ^6.4 || ^7.0
- symfony/translation: ^6.4 || ^7.0
- 2.8.x-dev
- 2.7.x-dev
- 2.7.0
- 2.6.x-dev
- 2.6.0
- 2.5.x-dev
- 2.5.0
- 2.4.x-dev
- 2.4.0
- 2.3.x-dev
- 2.3.0
- 2.2.x-dev
- 2.2.1
- 2.2.0
- 2.1.0
- 2.0.0
- 1.1.0
- 1.0.0
- 0.4.0
- 0.3.0
- 0.2.0
- 0.1.0
- dev-renovate/phpunit-phpunit-11.x
- dev-renovate/matthiasnoback-symfony-dependency-injection-test-6.x
- dev-readme-badge
- dev-renovate/phpunit-phpunit-10.x
This package is auto-updated.
Last update: 2024-09-14 19:47:43 UTC
README
This bundle provides services for defining static menus for symfony applications.
Installation
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
composer require nucleos/menu-bundle
Enable the Bundle
Then, enable the bundle by adding it to the list of registered bundles in config/bundles.php
file of your project:
// config/bundles.php return [ // ... Nucleos\MenuBundle\NucleosMenuBundle::class => ['all' => true], ];
Usage
Create a configuration file called nucleos_menu.yaml
:
# config/packages/nucleos_menu.yaml nucleos_menu: groups: // Header menu header: name: 'Header' attributes: id: 'header-nav' // Footer menu footer: name: 'Footer' // Main menu main: name: 'Main' attributes: class: 'nav navbar-nav' items: home: label: 'Home' icon: 'fa fa-home' route: 'app_home' routeParams: { path: '/' } downloads: label: 'Download' route: 'app_download_index' event: label: 'Event' route: 'app_event_index' // Submenu items children: venue: label: 'Venue' route: 'app_venue_index'
License
This bundle is under the MIT license.