[ic] "You Are Here" - Breadcrumb Trail

Jonathan Clark interchange-users@interchange.redhat.com
Mon Feb 18 17:32:00 2002


> Hi All
>
> Would anyone know how to create a breadcrumb component?
>
> What I would like to do is have it show up on all pages in the
> same location, and it would show the whole line of subcategories
> down from the home page.

First step is a category tree.. This not part of the foundation demo, but
possible. The [tree] tag comes in very handy. There are a number of threads
in the mail list archive about this.

See http://developer.akopia.com/archive/interchange-users/2001/msg09061.html
where Mike Heins gave a lot of useful information.

> Each level shown in the breadcrumb trail
> would be linked, and the output would look something like this:
>
> You Are Here : Home >> Optics >> Binoculars

I do this using the tree code for 'Binoculars' and walking the tree
backwards with the [tree] tag. You can do this with a reversed parent-child
relationship. Only problem is that the tree tag doesn't give an option to
reverse the list so you would get Binoculars >> Optics >> Home.

I fixed this by adding a single line of code to the [tree] tag at the end to
reverse the list.

See http://interchange.redhat.com/bugs/show_bug.cgi?id=372 for this as I put
it in as an enhancement request for future versions.

good luck!

Jonathan
Webmaint.