in-square/pimcore-breadcrumbs
最新稳定版本:v1.0.1
Composer 安装命令:
composer require in-square/pimcore-breadcrumbs
包简介
Breadcrumbs builder for Pimcore documents with multisite and multilanguage support.
README 文档
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.
统计信息
- 总下载量: 4
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-or-later
- 更新时间: 2026-01-18