I am working on a link directory and running into small items with the breadcrumbs. I'd like some feedback to make sure I am addressing them the right way. I am not an experienced Drupal developer, so I probably tweak things the wrong way (e.g. in the theme when it should be in a module, or vice versa). I will submit a feature request if any of this would be useful to generalize. I tried to reference other breadcrumb references.

What I am working on - http://user-experience.org/links/

(1) I am using the Drupal installation as a "subsite" - still managing a higher level of my site by hand. Someday all will be Drupal, but for now Drupal is a subsite - is this common? Has a situation like this been designed in - or avoided on purpose?

The implications on the breadcrumb are that -

(a) I want it to start at a URL that is outside of Drupal, e.g. http://user-experience.org/
(b) I want to replace "Home" with "Links" as the label for the top of the Drupal install
(c) I want the breadcrumb on the top page

I did some hacking to start to make this happen, but it seems as tho all of the breadcrumb references are scattered.

I got it working for "taxonomy_menu" http://user-experience.org/links/taxonomy_menu/2/10/17 but now I have to go back and do it again for "event" http://user-experience.org/links/event . For example, the word "Home" is hard-coded in each module. I can handle the repeated changes, but to me this could be centralized somehow. I could go to one place to add my "prefix" to the breadcrumb and change "Home" to something else. All modules would base their breadcrumbs on this central starting point.

I believe this has already been suggested - http://drupal.org/node/12166 - central breadcrumb management.

For now I will keep on making the same changes over and over again, but is centralized breadcrumb management a useful feature to add?

(2) I want my breadcrumb in the "global navigation area", instead of the below it, at the top of the "content space".

This was pretty easy to do. I just inserted the {breadcrumb} reference in the primary-links area (of xtemplate.xtmpl) -

<td id="primary-links">{breadcrumb}</td>

and commented out the existing reference -

<!-- BEGIN: title -->
<!-- {breadcrumb} -->

That seemed like the right way to do it and has not failed me yet. In the handbook - http://drupal.org/node/364 - I see good info on how to install a theme and how to write your own - how about a section on how to tweak a theme like I did above? I personally spend a lot of time tweaking a theme like this - but maybe I am doing things wrong.

Adding the breadcrumb to the top of the page may be what this issue was about - http://drupal.org/node/2973 - but I am not sure.

(3) I have a complicated taxonomy. For "location" breadcrumbs at the top of the page, the current implementation of breadcrumbs is great.

But when users get to a "leaf" node - such as http://user-experience.org/links/node/view/128 - there is the opportunity to expand the display of taxonomy values into breadcrumb format. "Attribute breadcrumbs" I call them.

Today, Drupal just shows the final term- in this example - Lansing (East), Michigan State, and Michigan UPA. (I picked a really complicated one on purpose). That is useful for getting to related items - items tagged the same way. But it does not show the richness of the taxonomy, where those terms belong in the grand scheme of things.

(a) The full path for these terms in this case would be -

  • By geography > By metropolitan area > Lansing (East)
  • Academia > Michigan State
  • Professional organizations > UPA > Michigan UPA

It can be implemented 2 ways - with each item its own link, or the whole breadcrumb as a single link. The latter is easier but the former matches the top of the page breadcrumb model.

(b) It gets more complicated, since "Lansing (East)" is in 2 parts of my "By geography" taxonomy. If we wanted to show all possible paths to this node, we would also have to add this attribute breadcrumb -

  • By geography > By distance > 2 hours > Lansing (East)

I know this is complex and may not be worth implementing. But in Drupal's information architecture where a node is "floating" like this, the breadcrumb at the top is worthless (e.g. it only points to the top of the site). Adding attribute breadcrumbs, in theory, helps users know where they are, and thus helps them find related information.

This was mentioned in http://drupal.org/node/7180 - if we do this, definitely only for leaf "permalink" displays, not as part of a list of nodes (where we should keep the simpler term display).

I know I have thrown a lot at you - all about this tiny feature of the breadcrumb. Your feedback would be welcome.

Comments

jibbajabba’s picture

I'm most interested in the possibility of multiple breadcrumbs you mention in #3:

But when users get to a "leaf" node - such as http://user-experience.org/links/node/view/128 - there is the opportunity to expand the display of taxonomy values into breadcrumb format. "Attribute breadcrumbs" I call them.

I too have wanted to expose the path up the taxonomy for nodes that have been tagged with multiple terms and find that this would help a lot for at least knowing where you are within the scheme of my blog or link organization. Weblink module handles this ok by showing the immediate parent, but the context of the whole branch would be more meaningful.

I know feature improvements like this seem complex, but these are core improvements that would help much in allowing people to make sense of a site's body of content.

moshe weitzman’s picture

in your theme, call taxonomy_get_parents_all($tid) for each term and then display the results as you wish. i think this is too much overhead to go into core by default but its no problem for a personal blog site.

moshe weitzman’s picture

the home page of drupal is customizable. you can use any drupal path (see admin/settings). you could use a small php page as your home page. that php page would simply pull in your index.html home page or whatever you want to show there.