Skip to content

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

ParameterDefault valueDescription
contextcurrent contextThe context key to search in
startId0Resource ID from which to start the breadcrumbs
endIdcurrent resource IDResource ID up to which breadcrumbs are built
level0Maximum depth (0 means no limit)
exclude''Comma-separated list of resource IDs to exclude
showHome1Whether to show the home page (when startId = 0)
showHidden1Whether 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}

© PageBlocks 2019-present