[ic] BreadCrumb Trail - Interpolate.pm Code, Tree Code

Jonathan Clark interchange-users@icdevgroup.org
Mon Jun 17 18:03:01 2002


> I'd like to use some sort of Breadcrumb trail like:
>
> You Are Here:  Tools > Hammers > Claw
>
> I've found some threads like the following:
>
> http://interchange.redhat.com/bugs/show_bug.cgi?id=372
> http://interchange.redhat.com/pipermail/interchange-users/2002-February/017876.html
>
> These refer to somehow using the Tree Mod (by Mike Heins) and to add a line to Interpolate.pm to help get the order of
> categories and subcategories correct.
>
> 1. Where in Interpolate.pm does the following line go?
>
> @rows=reverse(@rows) if $opt->{reverse};
>
> Jonathan Clark mentions that it should go in at tag_tree sub at line 5163 (in 4.8.2) line. That line looks like this:
>
> if($above->{$next} and ($opt->{autodetect} or ! $stop) ) {
>
> Should the extra line go BELOW the above line, like this:
>
> if($above->{$next} and ($opt->{autodetect} or ! $stop) ) {
> @rows=reverse(@rows) if $opt->{reverse};
>

do a search for the line:

  return labeled_list($opt, $text, {mv_results => \@rows});

this is the last line of the tree sub. It goes on a line above this.


> ----
>
> 2. Would someone be able to post some tree code for displaying the breadcrumb trail? I'm still hacking away with IC and
> don't quite have a handle on working with the tags.
>

In order to display the tree backwards, you must first be able to display it forwards. This is not part of the standard foundation
template. If you already have this set up (there are posts from Mike as to how to do this in the mail archive) then pls post a
trimmed version of your tree code so we can see how you have it working.

Walking the tree backwards will then be straightforward. ;-)

> ----
>
> 3. Will this breadcrumb code also work on special pages, cart pages, etc.?

see answer to 2.

Jonathan
Webmaint.