friendsofvictoire/breadcrumb-widget
A lightweight breadcrumb widget for PHP applications that builds hierarchical navigation trails from your routes or data. Render customizable, accessible breadcrumbs with minimal configuration and drop them into any Laravel view or Blade template.
First, the honest framing: this is a Symfony bundle (WidgetBreadcrumbBundle) that plugs a breadcrumb widget into Victoire DCMS, a Symfony-based CMS. It is not a Laravel package — there is no service provider, no Blade views, no config/*.php to publish. For a Laravel developer, the practical value is as a reference implementation you may port, not a dependency you install. Adding it to a Laravel composer.json will pull Symfony/Victoire constraints you cannot satisfy.
If you are actually on Symfony + Victoire:
composer require friendsofvictoire/breadcrumb-widget (verify the exact package name in the repo's composer.json — the repo name and Packagist name often differ for these bundles).app/AppKernel.php (Symfony 2/3 era) or config/bundles.php (Symfony 4+), following whatever the repo's README shows.bin/console cache:clear) and open a page in Victoire's edit mode.Where to look first, in this order:
composer.json — tells you the Symfony and Victoire version pins. This is the single most important file; it usually decides whether the bundle is even installable for you.*Bundle.php) — registration and any compiler passes.Resources/views/** — the Twig template you will override. This is where 90% of your day-to-day changes happen.Resources/config/ — service definitions and widget tags.First use case: drop the widget into a page template header so DCMS-rendered pages automatically show a trail derived from the page hierarchy, then theme it via a Twig override. That is the entire intended usage.
Editor-driven placement. In Victoire, business users place widgets; developers register them and control presentation. Your job is (a) make the widget appear in the editor and (b) make its output match the design. Do not build page-specific breadcrumb logic in PHP if a template override can do it.
Template override over code changes. The standard Symfony cascade applies: override the widget's Twig template in your app's templates/bundles/... directory (or app/Resources/... on older Symfony). This survives bundle updates and is the cheapest way to restyle, re-order separators, add icons, or add SEO markup.
Upgrade the markup while you're in there. These small CMS widgets almost never ship structured data. In your override, add:
<nav aria-label="Breadcrumb"> landmark,aria-current="page" on the last item,BreadcrumbList JSON-LD block.That is often a bigger win than the widget itself.
Custom trails. If your breadcrumb must reflect something other than the DCMS page tree (e.g. product → category → home), don't fight the widget. Either:
Subclassing the existing widget is possible but usually more coupling than it's worth.
Theming and translations. Style with your own CSS against the widget's class names; override translation files for labels ("Home", "You are here"). Keep separator characters in CSS (::after) rather than in the template so designers can change them without touching Twig.
Caching. Victoire caches rendered widgets with the page. If your breadcrumb depends on request state (locale, query params, authenticated user), verify the cache key or you will serve stale trails. Test with the cache enabled, not just in dev.
Porting to Laravel (the realistic path). If your goal is "I saw this and want it in Laravel," don't bridge it. Reimplement:
Breadcrumb service that takes a stack of [label, url] pairs,<x-breadcrumb :items="$items" />,That's roughly 50 lines and gives you full control, testing, and no Symfony coupling.
composer.json before spending any time.debug:container for the widget service and its tags.debug:twig that your override is the one being resolved.dump() in Twig or a temporary {{ dump() }} is faster than guessing at the widget's data shape.aria-current, or structured data. Budget an hour to add them in the override.How can I help you explore Laravel packages today?