https://github.com/feskol/navigationbundle
This bundle is an integration of the feskol/php-navigation library with extensions for Symfony applications.
https://github.com/feskol/navigationbundle
navigation navigation-active-state navigation-helper php php8 symfony-bundle symfony6
Last synced: 3 months ago
JSON representation
This bundle is an integration of the feskol/php-navigation library with extensions for Symfony applications.
- Host: GitHub
- URL: https://github.com/feskol/navigationbundle
- Owner: feskol
- License: mit
- Created: 2025-02-14T18:51:24.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-02-25T02:16:49.000Z (4 months ago)
- Last Synced: 2025-03-10T06:06:58.039Z (4 months ago)
- Topics: navigation, navigation-active-state, navigation-helper, php, php8, symfony-bundle, symfony6
- Language: PHP
- Homepage: https://packagist.org/packages/feskol/navigation-bundle
- Size: 59.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NavigationBundle
[](https://github.com/feskol/NavigationBundle/actions/workflows/test.yml)
[](https://codecov.io/gh/feskol/NavigationBundle)This bundle is an integration of
the [feskol/php-navigation](https://github.com/feskol/php-navigation) library
with extensions for Symfony applications.## Features
- 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.## Installation
### 1. Install the bundle
```bash
composer require feskol/navigation-bundle
```### 2. Enable the Bundle
FeskolNavigationBundle should be automatically enabled and configured, thanks
to [Flex](https://symfony.com/doc/current/setup/flex.html).If you don't use Flex, you can manually enable it, by adding the following line
in your project's `config/bundles.php`:```php
['all' => true],
];
```### 3. Configure the bundle (optional)
There are a few configurations available for this bundle. To make use of it,
start by creating a new config file:```yaml
# config/packages/feskol_navigation.yamlfeskol_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.
## Usage
Please read the documentation. It's available in the `docs` directory of this
bundle:- Read the [FeskolNavigationBundle documentation](docs/index.md)
## Compatibility
The current version of this bundle has the following requirements:
* PHP `8.1` or newer is required
* Symfony `6.1` or newer is required