pbCrumbs
Snippet for rendering breadcrumb navigation in MODX. Generates a breadcrumb trail from one resource to another, with options to exclude pages, limit depth, and customize templates.
Parameters
| Parameter | Default value | Description |
|---|---|---|
context | current context | The context key to search in |
startId | 0 | Resource ID from which to start the breadcrumbs |
endId | current resource ID | Resource ID up to which breadcrumbs are built |
level | 0 | Maximum depth (0 means no limit) |
exclude | '' | Comma-separated list of resource IDs to exclude |
showHome | 1 | Whether to show the home page (when startId = 0) |
showHidden | 1 | Whether to include resources hidden from menu (hidemenu) |
outputSeparator | '' | Separator between breadcrumb items |
tplWrapper | @INLINE <nav aria-label="breadcrumb"><ol class="breadcrumb">{$items}</ol></nav> | Wrapper template for the breadcrumb items |
tplItem | @INLINE <li class="breadcrumb-item"><a href="{$link}">{$title}</a></li> | Template for each breadcrumb item |
tplCurrent | @INLINE <li class="breadcrumb-item active" aria-current="page">{$title}</li> | Template for the current (last) page |
php
{'!pbCrumbs'|snippet}