[ic] Patch: ic 4.5.8 bar_link

Ton Verhagen ton@verhagen.net
Sat, 21 Oct 2000 14:03:01 +0200

When developing a site for one of my clients I had the need for dynamically 
generated menu bars. This can be done nicely with the bar_link sub in 
catalog_before.cfg. However I also wanted to highlight an item in the main 
menu for all related pages in a sub menu. In order to accomplish this task 
I made a little patch to link_bar. See below.

*** catalog_before.cfg  Fri Oct 20 11:00:36 2000
--- /usr/local/interchange/catalog_before.cfg   Sat Oct 21 13:15:40 2000
*** 189,194 ****
--- 189,196 ----
                         my $current = $Tag->var('MV_PAGE', 1);
               $highlight = 1 if   $page eq $current
+                               $page eq $Scratch->{page_class}
+                                   or
                                   $page eq $CGI->{ui_explode};
                         $url = $Tag->area( { href => $page, form => $form });

When setting the scratch variable page_class on a 'sub menu page', the 
corresponding item in the main menu will be highlighted as well.

Hope you find this useful.

My compliments for the improved UI and docs. Well done!!! And I totally 
agree with Birgit who already mentioned "Please keep on doing what you are 
doing." As doing so will make Interchange the defacto standard in 
e-Business. Wouldn't that be great!

All the best.

Ton Verhagen