Skip to content

πŸ”— This bundle provides services for defining static menus for symfony applications.

License

Notifications You must be signed in to change notification settings

nucleos/NucleosMenuBundle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

efc2999 Β· Feb 9, 2025
Feb 9, 2025
Feb 7, 2025
Feb 8, 2025
Feb 8, 2025
Dec 21, 2019
Feb 8, 2025
Apr 26, 2023
Feb 9, 2025
Aug 14, 2024
Mar 24, 2019
Feb 8, 2025
Feb 8, 2025
Dec 21, 2023
Nov 5, 2020
Feb 26, 2023
Feb 9, 2025
Apr 26, 2023

Repository files navigation

NucleosMenuBundle

Latest Stable Version Latest Unstable Version License

Total Downloads Monthly Downloads Daily Downloads

Continuous Integration Code Coverage

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.