Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding link on the header


spikesforu

Recommended Posts

Posted

I think the contribution named Cool Menu will do this although I have never used it. A very quick and easy way is to use the following bit of code. I found this code here on the forums but it has been a while and I can't find that thread now. I no longer use it but it worked exactly as the site you asked about. You have to create your own images for the on and off tabs. It's a pretty simple job but if you run into problems I can send you the two I created. This example only shows two pages. You will need to add the additional code for whatever tabs you want to add.

 

in header.php

<?php      
    $parsed = parse_url($REQUEST_URI);
    $parsed = $parsed['path'];
    
switch (basename($PHP_SELF)) {
        case "shipping.php":
        $css1 = "tab";
        $css2 = "tab";
        $css3 = "on";
        $css4 = "tab";
        $css5 = "tab";
        $css6 = "tab";
        break;
        
        case "about_us.php":
        $css1 = "tab";
        $css2 = "on";
        $css3 = "tab";
        $css4 = "tab";
        $css5 = "tab";
        $css6 = "tab";
        break;
    }
    ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td align="center" width="95" class="<?php echo $css1; ?>" valign="bottom"><a class="tablink" title="Home" href="<?php echo tep_href_link(FILENAME_DEFAULT, '', 'NONSSL'); ?>">Home</a></td>
          <td align="center" width="95" class="<?php echo $css2; ?>" valign="bottom"><a class="tablink" title="About Us" href="<?php echo tep_href_link(FILENAME_ABOUT_US, '', 'NONSSL'); ?>">About Us</a></td>
        </tr>
      </table>

 

in sytelsheet.php

.tab {
  font-family: Verdana, Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: bold;
  font-variant: small-caps;
  color: #000000;
  background-image: url(images/so/nav_button_off.gif);
  background-repeat: no-repeat;
  text-align: center;
  padding-top: 4px;
  padding-bottom: 0px;
}
.on {
  font-family: Verdana, Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: bold;
  font-variant: small-caps;
  color: #000000;
  background-image: url(images/so/nav_button_on.gif);
  background-repeat: no-repeat;
  text-align: center;
  padding-top: 4px;
  padding-bottom: 0px;
}

 

HTH,

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Archived

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

×
×
  • Create New...