Non-hierarchical breadcrumbs in Drupal

Straight out of the box, breadcrumbs in Drupal work hierarchically, based upon the navigation menu. There are several modules that extend this functionality, and this article is a nice explanation of 3 modules that play well together to extend the typical navigation-based breadcrumb in Drupal. However, there are times when a client may want a breadcrumb to function much like the fairytale path of Hansel & Gretel wherein crumbs represent the path that the user navigates on her own through a site. What is a Drupal developer to do?

Well, first, let's discuss why this request deserves merit, especially when highly-structured, pull down navigation menus and breadcrumbs seem to be de rigueur. The Hansel & Gretel analogy comes with a warning: the only reason why the pair dropped crumbs was because they were lost. These days, it seems like there has been so much stress placed on usability in web development that the concept of being lost in content is inherently a negative. And yet, so much of our entertainment and marketing strategies are designed to enable the user to become lost. Just take a field trip to your nearest shopping mall to experience how this strategy is alive and well. Many stores even place a horizontal, central wall near the entrance of the store to divert traffic out of a clear, unidirectional flow (e.g. Hollister and Banana Republic). Whereas these stores still try to direct the path of the visitor (i.e. toward high ticket or impulse items and away from sale items), a somewhat loose analogy can still be made between these immersive experiences and websites that encourage visitors to explore their sites in a non-hierarchical manner through folksonomies, embedded wiki-like links, etc. In fact, while website navigation systems have grown more structured with the development of fancy pulldown menus, I have found that our desktop environments for our operating systems have grown less hierarchical and more weblike with the addition of shortcuts/aliases/symlinks, start menus/docks, trackback arrows in filebrowser windows, etc. So, perhaps it's okay to depart a bit from the anal-retentive hierarchical menu system and let the users make their own navigational paths...

Of course, another reason why breadcrumbs have developed to mimic menu systems is because users already have the option to trace their path backward with their browser's back arrow. But, the back arrow has grown less useful on dynamic sites that are driven by user input; increasingly, users face the "...resend information..." error, which may leave some users in a panic or at the very least, slightly annoyed. For other, content-rich sites, users may lose track of where they were just a few pages ago, and don't necessarily want to step back the same way they came to their present location. For these users, a Hansel & Gretel type breadcrumb trail may be useful since it allows users to see the path that they've blazed and to jump back at any point without tracking back through each individual page (akin to selecting a page from the browser's history rather than the back arrow).

If you're in a situation, like we were, of needing to fulfill this feature for a client, then I highly recommend the Clickpath module, which allows you to customize the number of paths to "remember" and display, to ignore particular paths from the trail, and to rename your frontpage if necessary. The developers have posted a worthwhile patch to test as well, which allows you to grab titles from pages that normally aren't included with the drupal_get_title() function (e.g. views!). In addition, our client wanted the current page to be appended to their breadcrumb, which can be done through the theme.  Since we wanted to support multiple themes across the site, we're currently testing a possible feature addition that does this sitewide, controlled via a menu selection in the settings menu for the Clickpath module.

Have you tricked out your Drupal breadcrumb lately? If so, we'd love to hear about it!

Faceted Search

Related by tag

drupal, views

drupal

developer, drupal, php

drupal, panels, views

drupal, mobile, panels

drupal, Drupal Planet, security

drupal, Drupal Planet

drupal, usability

drupal, ubercart

command line, drupal, Drupal Planet

drupal, mac, mamp

drupal, Drupal Planet, omega

Tags

Author Profile

Angela Labrador's picture
Angela Labrador

I have 13 years of database development experience in MySQL, PostgreSQL and FileMaker Pro and enjoy knowledge domain modeling as well as user interface design. I've been designing database-driven websites in PHP for 10 years and got on board the Drupal train in its early days. I'm a PhD candidate in anthropology at UMass Amherst, and my graduate research has included the development of affordable and/or open source collection management software for heritage professionals. Like life, my website is always in process.