Breadcrumb
Breadcrumbs can be a pain. They need to consistent across the entire of a site, but in many cases you simply don’t have all the same data, all the time.
Basic Usage
What you want
You’d like a breadcrumb to be something like : *Our Site > Journal > 2010 > August > What a day we’ve had*, where each segment is links to the relevant url.
What to do
Using the minimum of options you just need to use the tag :
{exp:jb_breadcrumb}
What you’ll get
Using the main tag, with no paramaters supplied, it will return something of the form :
How it works
From a technical point of view it breaks the uri (ie. /news/09/03/entry_title) into an array of the segments. For each part of that array it checks if there’s a corresponding unique url_title in the system, if it finds one it uses that as the value, if not, it tries to clean the segment up as best it can.
Extra options
When you’re ready to move beyond the basic functionality there are some extra options for you to play around with.
To use these extra options, either pass them along with the standard tag like this :
{exp:jb_breadcrumb extra_paramater="value"}
or (my preferred method) add the options to your global variables (path.php etc).
Installation
For EE1.6.x place the file pi.jb_breadcrumb.php, from the EE1 folder into you’re system/plugins folder. For EE2.x place the folder jb_breadcrumb from the EE2 folder in your third_party folder.
Support
Any extra feature requests or support issues should be sent to hi@jo3l.net.
Changelog
- 2.3
- Fixed an offset bug
- 2.2
- Added some new tags
- 2.1
- Reorganized logic for better performance and got rid of an unnecessary sql query
- 2.0
- EE2.x compatible release
- 1.3
- Filter weblogs/channel option
- 1.2
- Added extra optional parameters (css class and id)
- 1.1
- Basic Fixes
- 1.0
- Initial Release