Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    Sep 2008
    Posts
    32
    Plugin Contributions
    0

    Default Adding Classes to navigation

    hi,

    i need a way for zen cart to automatically add a class to the horizontal navigation list item depending on what page it is on. at the moment i have manually added a class to the home tab which gives it a orange background. only problem with this is when i click on other links they dont change background:


    http://thirstconnection.co.uk/

  2. #2
    Join Date
    Sep 2008
    Posts
    32
    Plugin Contributions
    0

    Default Re: Adding Classes to navigation

    is there anyway i could grab the variable from the url and do a conditional statement.

    e.g.

    <li><a href="index.php?main_page=delivery_area"
    <?php if ($main_page == "login") {
    echo 'class="orangebackground";
    }
    echo '>'; ?>

    i just quizkly typed something like that so u understand what i mean

 

 

Similar Threads

  1. Adding classes to attributes.
    By Inxie in forum Setting Up Categories, Products, Attributes
    Replies: 12
    Last Post: 8 Oct 2012, 03:26 PM
  2. Adding classes
    By dddmx3 in forum General Questions
    Replies: 0
    Last Post: 8 Apr 2011, 01:30 AM
  3. Adding My Navigation
    By WesternStandard in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 10 Oct 2006, 10:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg