mhinspeya/module-breadcrumbmod

Magento 2 module that enhances product page breadcrumbs by displaying the full category path navigation instead of the default flat breadcrumb.

Maintainers

Package info

git.modehaus.de/hyvae/breadcrumbmod

Homepage

Type:magento2-module

pkg:composer/mhinspeya/module-breadcrumbmod

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

1.0.0 2026-06-29 09:43 UTC

This package is not auto-updated.

Last update: 2026-06-30 08:15:32 UTC


README

A Magento 2 module that enhances product page breadcrumbs by displaying the full category path navigation instead of the default flat breadcrumb.

Compatibility

RequirementVersion
Magento2.4.8+
PHP8.2 – 8.4

Features

  • Replaces the default product page breadcrumb with a full category path trail
  • Automatically resolves the product's assigned category hierarchy
  • Displays Home → Category → Subcategory → … → Product Name
  • Only renders active categories that are in the root category list
  • Gracefully degrades when no category is assigned (shows Home → Product Name)

Installation

Via Composer

composer require mhinspeya/module-breadcrumbmod
bin/magento module:enable MHinspeya_BreadcrumbMod
bin/magento setup:upgrade
bin/magento cache:flush

Manual Installation

  1. Copy the module files to app/code/MHinspeya/BreadcrumbMod/
  2. Enable the module and run setup:
bin/magento module:enable MHinspeya_BreadcrumbMod
bin/magento setup:upgrade
bin/magento cache:flush

How It Works

The module uses an after-plugin on Magento\Catalog\Controller\Product\View::execute() to modify the breadcrumb block on product pages.

Flow

  1. Intercepts the product view page result after the controller executes
  2. Retrieves the current product via ProductRepositoryInterface using the request parameter
  3. Resolves the product's category path and loads the full category collection
  4. Iterates through active categories and adds each as a breadcrumb crumb
  5. Appends the product name as the final breadcrumb item

Architecture

Plugin/Product/View.php          → After-plugin on product controller
etc/frontend/di.xml              → Plugin registration (frontend scope)
etc/module.xml                   → Module declaration with Catalog & Theme dependencies
view/frontend/layout/
  catalog_product_view.xml       → Ensures breadcrumbs block uses the theme template

Module Structure

MHinspeya/BreadcrumbMod/
├── Plugin/
│   └── Product/
│       └── View.php                  # After-plugin for breadcrumb modification
├── etc/
│   ├── frontend/
│   │   └── di.xml                    # Plugin DI configuration
│   └── module.xml                    # Module declaration
├── view/
│   └── frontend/
│       └── layout/
│           └── catalog_product_view.xml  # Layout override for breadcrumbs block
├── composer.json
├── registration.php
└── README.md

Uninstallation

bin/magento module:disable MHinspeya_BreadcrumbMod
composer remove mhinspeya/module-breadcrumbmod
bin/magento setup:upgrade
bin/magento cache:flush

License

Proprietary – © MHinspeya.de by SOL.Service Online