https://github.com/nucleos/nucleosmenubundle
🔗 This bundle provides services for defining static menus for symfony applications.
https://github.com/nucleos/nucleosmenubundle
bundle generator hacktoberfest knpmenu menu php sonata sonata-block symfony symfony-bundle
Last synced: about 1 month ago
JSON representation
🔗 This bundle provides services for defining static menus for symfony applications.
- Host: GitHub
- URL: https://github.com/nucleos/nucleosmenubundle
- Owner: nucleos
- License: mit
- Created: 2017-12-01T17:25:36.000Z (over 8 years ago)
- Default Branch: 2.8.x
- Last Pushed: 2025-05-07T03:01:49.000Z (11 months ago)
- Last Synced: 2025-07-08T22:19:54.036Z (9 months ago)
- Topics: bundle, generator, hacktoberfest, knpmenu, menu, php, sonata, sonata-block, symfony, symfony-bundle
- Language: PHP
- Homepage: https://nucleos.rocks
- Size: 1.16 MB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
NucleosMenuBundle
=================
[](https://packagist.org/packages/nucleos/menu-bundle)
[](https://packagist.org/packages/nucleos/menu-bundle)
[](LICENSE.md)
[](https://packagist.org/packages/nucleos/menu-bundle)
[](https://packagist.org/packages/nucleos/menu-bundle)
[](https://packagist.org/packages/nucleos/menu-bundle)
[](https://github.com/nucleos/MenuBundle/actions?query=workflow%3A"Continuous+Integration"+event%3Apush)
[](https://codecov.io/gh/nucleos/NucleosMenuBundle)
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:
```php
// config/bundles.php
return [
// ...
Nucleos\MenuBundle\NucleosMenuBundle::class => ['all' => true],
];
```
## Usage
Create a configuration file called `nucleos_menu.yaml`:
```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](LICENSE.md).