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

v1.0.1 2026-01-20 08:49 UTC

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 Link and Folder documents, and documents with navigation_exclude.
  • Resolves label from navigation_name property, then title, then key.
  • Determines the language root by walking up the parents and stopping at the last document with the same explicit language property 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.