I’ve always found breadcrumb navigation in ExpressionEngine cumbersome.
There are some reasonable solutions if you’re happy to manually create your site structure using add-ons such as Structure or Taxonomy, but for those of us who prefer to stick with the standard ExpressionEngine way of doing things, the options have been rather limited.
Until now, if you wanted to implement breadcrumb navigation for a “standard” ExpressionEngine site you had two choices:
- Roll-your-own, using “segment sniffing”, embedded templates, and EE conditionals. Repeat for each section with a slightly different URL structure.
- Use a plugin that reads the URL and “humanises” it, by converting dashes to spaces, and capitalising words.
The former is ugly, high-maintenance, and fiddly to implement. The latter is over-simplistic, and falls apart the moment your client says he’d like the
about section breadcrumb to read “About Us”.
Fixing the problem
Whilst working on a client site a few months ago, I once again found myself struggling to implement highly customised breadcrumbs in a clean and simple manner.
This time, I decided to do something about it.
The first thing I did was write a brief “requirements” statement, clearly stating what any breadcrumbs add-on worth its salt should do. Being the positive sort, I wrote it in the present tense:
<blockquote> <div markdown="1">Crumbly is an ExpressionEngine 2 add-on, which automatically generates page breadcrumbs based on the current URL.
Crumbly recognises any standard EE URL structure, and automatically translates it into human-readable breadcrumbs. It’s smart enough to cope with
index.php being renamed, or entirely removed from the URL.
Crumbly can also be easily configured to handle pages that use a “non-standard” URL structure.
Finally, Crumbly allows the user to specify custom labels for template groups and templates, as well as a “glossary” of terms for use with custom URL segments.