Breadcrumb is a snippet for MODx Revolution, inspired by the jaredc/splittingred's BreadCrumbs snippet.
As the original jaredc/splittingred's BreadCrumbs, this snippet will create a breadcrumb navigation (no kidding
). That's not all ! I also added several new feature that I really needed like template properties or specific resource ID property.
Documentation :
http://rtfm.modx.com/display/ADDON/BreadCrumb
Package :
http://modx.com/extras/package/breadcrumb
Github :
https://github.com/omycode/breadcrumb
Usage
// Show the breadcrumb of the current resource
[[BreadCrumb]]
// Show the breadcrumb of the resource whose ID is 72
[[BreadCrumb? &to=`72`]]
// Show the breadcrumb of the resource whose ID is 72 from it's level 2 parent
[[BreadCrumb? &from=`[[UltimateParent? &topLevel=`2`]]` &to=`72`]]
// Change the direction of the breadcrumb : rtl (Right To Left) or ltr (Left To Right)
[[BreadCrumb? &direction=`rtl`]]
// Use custom templates
[[BreadCrumb? &linkCrumbTpl=`myLinkCrumbTpl`]]
This snippet support most of jaredc/splittingred's BreadCrumbs features :
- maxCrumbs
- pathThruUnPub (now as showUnPub)
- respectHidden (now as showHidden)
- showCrumbsAtHome
- showCurrentCrumb
- showHomeCrumb
And add new features that I really needed :
- chunk as templates (properties &containerTpl, ¤tCrumbTpl, &linkCrumbTpl, &maxCrumbTpl)
- breadcrumb for and from specific resource (property &from and &to)
- direction (property &direction)
- showContainer property
Some properties of jaredc/splittingred's BreadCrumbs have been removed but can easily be replaced by chunk / CSS customization, as :
- crumbSeparator
- currentAsLink
- descField
- homeCrumbDescription
- homeCrumbTitle
- maxDelimiter
- titleField
[ed. note: ben_omycode last edited this post 12 years, 8 months ago.]