View Single Post
  #2  
Old 03-31-2006, 12:50 PM
 
brettcta brettcta is offline
 

Newbie
  
Join Date: Mar 2006
Location: Chicago, IL
Posts: 5
 

Default One solution to hide active category/product in location.tpl

I mucked around with my quandry a bit and came up with the following, which does seem to accomplish both goals I mention above.

However, the position divider - in this case :: - becomes part of the following position's hyperlink. With the default skin1 font class=NavigationPath, this effectively makes the dividers the same color as the positions, (along with hover colors, etc). For the time being, I'm just going to create a new class in skin1 so I can maintain the appearance of NavigationPath in location.tpl but avoid having this appearance on hover (in this case, when hovering over category "Media Types", sans color):

Home :: Media Types :: Books

However, this does successfully eliminate the active category from showing up (as well as its subsequent divider), in addition to eliminating a product title from showing up when viewing that product. If you might have a suggestion as to how to keep the divider from being affected in this way, please let me know.

Anyway, this is the code I ended up with, which doesn't completely disresemble a long, strandy type of pasta, IMO:

Code:
{if $location} <FONT class="NavigationPath"> {strip} Home {section name=position loop=$location start=1} {if $location[position].1 ne "" } <A href="{$location[position].1}" class="NavigationPath">{/if} {if not %position.last%} ::{$location[position].0} {if $location[position].1 ne "" }</A>{/if} {/if} {/section} {/strip} </FONT> {/if}
__________________
-----
X-Cart Gold 4.0.18
Reply With Quote