Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/m-adamski/symfony-breadcrumbs-bundle
The Symfony Bundle, which simplifies the process of generating and displaying breadcrumbs
https://github.com/m-adamski/symfony-breadcrumbs-bundle
breadcrumbs-bundle php symfony symfony-bundle
Last synced: about 2 months ago
JSON representation
The Symfony Bundle, which simplifies the process of generating and displaying breadcrumbs
- Host: GitHub
- URL: https://github.com/m-adamski/symfony-breadcrumbs-bundle
- Owner: m-adamski
- License: mit
- Created: 2018-10-22T09:30:12.000Z (about 6 years ago)
- Default Branch: 5.0
- Last Pushed: 2024-11-03T17:00:40.000Z (3 months ago)
- Last Synced: 2024-11-15T22:06:35.993Z (2 months ago)
- Topics: breadcrumbs-bundle, php, symfony, symfony-bundle
- Language: PHP
- Homepage:
- Size: 34.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Breadcrumbs Bundle for Symfony
The Symfony Bundle, which simplifies the process of generating and displaying breadcrumbs.
Compared to previous versions, this one is based on simple methods of creating and adding breadcrumbs.Package ``symfony/translation`` is no longer required. If you would like to translate breadcrumbs, do it in the
template.Version 5.0 doesn't have compatibility with previous versions.
## Installation
Composer can install this bundle:
```
$ composer require m-adamski/symfony-breadcrumbs-bundle
```## How to use it?
```php
use Adamski\Symfony\BreadcrumbsBundle\Helper\BreadcrumbsHelper;
use Adamski\Symfony\BreadcrumbsBundle\Model\Breadcrumb;$this->breadcrumbHelper
->add((new Breadcrumb("Dashboard"))->setRoute("dashboard"))
->add((new Breadcrumb("Users"))->setRoute("user"));
```The custom Twig function is responsible for displaying breadcrumbs:
```(html)
{{ breadcrumbs() }}
```
## License
MIT