[development] breadcrumbs
Mark Fredrickson
mark.m.fredrickson at gmail.com
Sun Jan 28 23:29:13 UTC 2007
I've been letting this thread go by, as I agree with most of what has been said.
I'd like to add my thought: let's make the breadcrumbs an array of
paths. I dislike that there is just one breadcrumb, and if Module A
creates a breadcrumb, and Module B later suggests a different path,
A's is overwritten.
I would suggest copying the node access system and having modules
suggest breadcrumbs. Then provide the theme layer with this
information and let it choose. By default the BC's can be ranked by
module execution order, so this would be basically backwards
compatible.
I think a hook_breadcrumb($path, $node = NULL) { return array(this,
is, my, path); } would be useful. Perhaps returning a well-formed
links array (so we could have a hook_alter_breadcrumb).
Then, modules, user input, or the theme layer could choose a
breadcrumb based on their preferences.
Welcome the Bread Crumb API (a subset of the Data API, *nods at Adrian*)
-Mark
On 1/28/07, Jeremy Epstein <jazepstein at gmail.com> wrote:
> On 1/29/07, Angela Byron <drupal-devel at webchick.net> wrote:
> > Really, my only major beef with Drupal's breadcrumbs is that the
> > current page (non-linked) is not included. See http://
> > developer.yahoo.com/ypatterns/pattern.php?pattern=breadcrumbs
> >
> > However, I guess that's why we want to make it all configurable. ;)
>
> You can easily add the current page (linked or non-linked) to the
> breadcrumb trail by overriding theme('breadcrumb').
>
> Cheers,
> Jaza.
>
More information about the development
mailing list