This bundle is an integration of the feskol/php-navigation library with extensions for Symfony applications.
- Automatically tracks a link's active status and makes it easy to check if a parent navigation item has active child links.
- Easy to set up and integrate into existing projects.
- Flexible and extensible for complex navigation structures.
composer require feskol/navigation-bundle
FeskolNavigationBundle should be automatically enabled and configured, thanks to Flex.
If you don't use Flex, you can manually enable it, by adding the following line
in your project's config/bundles.php
:
<?php
return [
// ...
Feskol\Bundle\NavigationBundle\FeskolNavigationBundle::class => ['all' => true],
];
There are a few configurations available for this bundle. To make use of it, start by creating a new config file:
# config/packages/feskol_navigation.yaml
feskol_navigation:
# Change the default template
#template: 'my-navigation-template.html.twig'
# Default render active links as normal link-tags instead of span-tag
#active_as_link: true
Make sure you bin/console cache:clear
after you change the config.
Please read the documentation. It's available in the docs
directory of this
bundle:
- Read the FeskolNavigationBundle documentation
The current version of this bundle has the following requirements:
- PHP
8.1
or newer is required - Symfony
6.1
or newer is required