mikamatto / breadcrumb-bundle
A Symfony bundle for managing breadcrumbs.
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=8.0
- symfony/framework-bundle: ^5.0|^6.0|^7.0
- symfony/routing: ^5.0|^6.0|^7.0
- symfony/yaml: ^5.0|^6.0|^7.0
This package is auto-updated.
Last update: 2024-10-09 18:22:04 UTC
README
A Symfony bundle for managing breadcrumbs in your Symfony applications. My first bundle, so don't use it as it still sucks.
Installation
Use Composer to install the bundle:
composer require mikamatto/breadcrumb-bundle ### Breadcrumbs file input The structure is read by default in a yaml file located at config/breadcrumbs.yaml Or you can add a custom file using a yaml package configuration file: breadcrumb: breadcrumbs_file: '%kernel.project_dir%/config/breadcrumbs.yaml' #### YAML Structure Here's a sample structure of the breadcrumbs.yaml file: app_contact: label: 'Contact Us' app_account: label: 'Account Settings' parameters: id: 'user.id' app_profile: label: 'Profile' parameters: id: 'user.id' chain: ['app_account'] Every block header is the route name. For every block we have the label to display in the breadcrumb, any route parameters, and a chain of routes. Example, the route app_profile will generate: Account Settings > Profile