ics / navigation-bundle
Bundle for symfony navigation
Installs: 213
Dependents: 3
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- symfony/config: ^5.2
- symfony/framework-bundle: ^5.2
- symfony/orm-pack: ^2.1
- symfony/twig-bundle: ^5.2
- twig/extra-bundle: ^3.3
- twig/twig: ^3.3
README
Navigation management for symfony
This bundle provide Bootstrap Navigation bar configure in config files
Installation
Make sure Composer is installed globally, as explained in the installation chapter of the Composer documentation.
Applications that use Symfony Flex
Open a command console, enter your project directory and execute:
composer require ics/navigation-bundle
Applications that don't use Symfony Flex
Step 1: Download the Bundle
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
$ composer require ics/navigation-bundle
Step 2: Enable the Bundle
Then, enable the bundle by adding it to the list of registered bundles
in the config/bundles.php
file of your project:
// config/bundles.php return [ // ... ICS\NavigationBundle\NavigationBundle::class => ['all' => true], ];
Configuration
Simple configuraton
# config/packages/navigation.yaml navigation: navbars: mainnav: brand: BrandText brandIcon: fa fa-check color: dark fixed: sticky searchenabled: true searchroute: homepage items: homepage: lib: homepage icon: fa fa-home route: homepage usermenu: activate: true connexionroute: homepage autolib: false childs: logout: lib: Sign-out icon: fa fa-sign-out route: homepage
And Add renderer in your base.html.twig
{# templates/base.html.twig #} <body> {{ renderNavBar('mainnav') }}
Full configuration
this is the full configuration with default value
navigation: usermenu: activate: false autolib: true lib: User Menu connexionlib: Sign In connexionicon : fa fa-sign-in-alt connexionroute: app-login childs: item1: lib: '' icon: '' route: '' roles: [] navbars: navbar1: '' brand: '' brandRoute: homepage brandIcon: '' brandImage: '' type: navbar # navbar or sidebar searchenabled: false searchroute: search color: light # primary, secondary, success, danger, warning, info, light, dark, white, transparent fixed: none # none, top, bottom, sticky items: items1: lib: '' icon: '' route: '' roles: [] childs: child1: lib: '' icon: '' route: '' roles: []
License
This software is published under the MIT License