Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2011
    Posts
    68
    Plugin Contributions
    0

    Default Highlight Current Link

    Hi,

    How do I highlight the "home" link when i'm on the homepage?

    Thanks

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,262
    Plugin Contributions
    3

    Default Re: Highlight Current Link

    More clarity required.

    WHAT home link are you referring to. and what do you mean by "highlight"?

    Most elements that have a CLASS or ID can be styled using css.

    If you want something "highlighted", or emphasised, then all you need to do is add an appropriate declaration to the element's style ID (or CLASS) and commit this to the relevant stylesheet.

    You can learn about CSS at W3schools.com
    19 years a Zencart User

  3. #3
    Join Date
    Oct 2011
    Posts
    68
    Plugin Contributions
    0

    Default Re: Highlight Current Link

    Thanks for the reply.

    I have a menu where I need each link to be highlighted when a visitor is on that page. For example, the home link when on the homepage, category 1 link when on category 1 page.
    I've read about doing it using "if" statement but im not the best with php at the moment. No problem with CSS but not sure what php script to put it.

    Thanks

  4. #4
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: Highlight Current Link

    One way I've done that is to make that menu with EZ page links and install Glenn's excellent EZ Pages Improved Menu mod:

    http://www.zen-cart.com/index.php?ma...oducts_id=1840

  5. #5
    Join Date
    Oct 2011
    Posts
    68
    Plugin Contributions
    0

    Default Re: Highlight Current Link

    Unfortunately I cannot use the mod as I'm using a customized mega drop down menu.

  6. #6
    Join Date
    May 2009
    Posts
    1,219
    Plugin Contributions
    2

    Default Re: Highlight Current Link

    How about google?

    google search highlight current page tutorials

    Basically they say the same thing.

  7. #7
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Highlight Current Link

    This link from the google search has a good explanation:

    http://www.mstudiostalk.com/2008/03/...he-navigation/

    To a certain extent, Zen Cart already creates relevant body ids; however, they cannot distinguish individual categories, products or ez-pages. Smart Backgrounds in Free Addons can create individual body classes for any of these. By default, it requires an image with a name constructed according to certain rules to activate the class creation. It would be possible to alter its function to always create body class tags. In either case, this can be used to make the article's page identifier. Then you need to alter the menu code to give tags to the menu items.

 

 

Similar Threads

  1. Flyout Menu highlight current category
    By scott_ease in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 28 Jul 2012, 06:06 PM
  2. regaining highlight of current ezpage
    By dayaki in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 5 May 2011, 12:06 PM
  3. Highlight current moreinformation & information sidebox links
    By PhilipB in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 10 Mar 2011, 01:13 PM
  4. Highlight the Current Page with CSS
    By FoodDudes in forum Templates, Stylesheets, Page Layout
    Replies: 12
    Last Post: 28 Feb 2010, 01:13 AM
  5. highlight current link
    By rob222 in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 14 Mar 2008, 03:24 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR