in-square / pimcore-breadcrumbs
Breadcrumbs builder for Pimcore documents with multisite and multilanguage support.
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/in-square/pimcore-breadcrumbs
Requires
- php: ^8.3
- mhujer/breadcrumbs-bundle: ^1.5
- pimcore/pimcore: ^11.0
- symfony/http-foundation: ^6.4
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.12
- phpstan/phpstan: ^1.8
- phpstan/phpstan-symfony: ^1.2
This package is not auto-updated.
Last update: 2026-01-20 08:50:12 UTC
README
Breadcrumbs builder for Pimcore documents with multisite and multilanguage support.
Requirements
- PHP 8.3+
- Pimcore 11 / Symfony 6.4
- mhujer/breadcrumbs-bundle
Installation
composer require in-square/pimcore-breadcrumbs
Usage
Inject the service and generate breadcrumbs from the current document:
use InSquare\PimcoreComponents\Breadcrumbs\Breadcrumbs; use Pimcore\Model\Document; public function defaultAction(Document $document, Breadcrumbs $breadcrumbs): Response { $breadcrumbs->generateDocumentBreadcrumbs($document); return $this->render('default/default.html.twig'); }
Add extra items (for example, object details):
$breadcrumbs ->generateDocumentBreadcrumbs($document) ->addItem($object->getName(), $objectUrl);
Behavior
- Skips
LinkandFolderdocuments, and documents withnavigation_exclude. - Resolves label from
navigation_nameproperty, thentitle, thenkey. - Determines the language root by walking up the parents and stopping at the last
document with the same explicit
languageproperty as the current page. - Uses the current request host to build absolute URLs.
Rendering
The component uses mhujer/breadcrumbs-bundle, so you can render in Twig:
{{ wo_render_breadcrumbs() }}
Configure the view template in config/packages/white_october_breadcrumbs.yaml as needed.