Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

making a button with down/selected status


itsjust

Recommended Posts

Posted

I am trying to make my own button system for the catelog directory. I am half way there, but could use a little help to figure out how to make the button show as pressed down when the catelog or undermenues are chosen.

 

This is my script so far:

 

if (isset($HTTP_GET_VARS['cPath=21_3'])) { echo '<a href="' . tep_href_link('index.php', 'cPath=21_3') . '" class="menuDown"> . MENU_TEXT_BUTTON_ONE';

 

}else{ echo '<a href="' . tep_href_link('index.php', 'cPath=21_3') . '" class="menuUp"> . MENU_TEXT_BUTTON_THREE';

}

 

What am I doing wrong? I know it has to do with the $HTTP_GET_VARS['cPath=21_3']

 

If you know a different and better way to make this kind of button then please tell. It would be great if the button could also have rollover/hover effect!

Posted

found the solution my self.

 

It should look like this:

 

if ($cPath == '21_3' || substr($cPath, 0, 5) == '21_3_') { echo '<a href="' . tep_href_link('index.php', 'cPath=21_3') . '" class="menuDown"> . MENU_TEXT_BUTTON_ONE';

 

}else{ echo '<a href="' . tep_href_link('index.php', 'cPath=21_3') . '" class="menuUp"> . MENU_TEXT_BUTTON_THREE';

}

 

By luck I found the answer in http://www.oscommerce.com/forums/index.php?showtopic=101369 and aplied it to what I wanted

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...