View Single Post
  #1  
Old 12-09-2004, 08:57 PM
 
zilker zilker is offline
 

Advanced Member
  
Join Date: Feb 2003
Posts: 89
 

Default help changing navigation tabs based on current page

Hello,

I need some help with my navigation tabs. They can be seen here:

http://toybuyandsell.com/store/customer/home.php

Basically, I want them to change based on what page the user is on. If they click the home page, the "home" tab will be selected. I was able to make this happen for the home, buy and help tabs by using the following if statements:

Code:
<table cellpadding=0 cellspacing=0 border=0> <tr valign="bottom"> <td>{if $main eq "catalog" and $current_category.category eq ""}[img]{$ImagesDir}/tab_home_.gif[/img]{else}[img]{$ImagesDir}/tab_home.gif[/img]{/if}</td> <td>{if $main eq "cart" or $main eq "wishlist" or $main eq "anonymous_checkout" or $main eq "checkout" or $main eq "product" or $main eq "giftcert" or $main eq "catalog"}[img]{$ImagesDir}/tab_buy_.gif[/img]{else}[img]{$ImagesDir}/tab_buy.gif[/img]{/if}</td> <td>[img]{$ImagesDir}/tab_sell.gif[/img]</td> <td>[img]{$ImagesDir}/tab_contact.gif[/img]</td> <td>{if $main eq "help"}[img]{$ImagesDir}/tab_help_.gif[/img]{else}[img]{$ImagesDir}/tab_help.gif[/img]{/if}</td> </tr> </table>

A simple if statement will provide the results of a "main" section but I haven't found out how to make it happen for a section under main. Example...contactus is under help. I've tried the following but it doesn't work:

Code:
{if $section eq "contactus"}[img]{$ImagesDir}/tab_contact_.gif[/img]{else}[img]{$ImagesDir}/tab_contact.gif[/img]{/if}

Can anyone help? I think it's just a smarty command that I don't know of.
__________________
~zilker

uummm...perhaps you should tell me again.

http://www.designertrends.com
Version 4.0.6
Unix
Reply With Quote