Hi,
How do I highlight the "home" link when i'm on the homepage?
Thanks
Hi,
How do I highlight the "home" link when i'm on the homepage?
Thanks
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
20 years a Zencart User
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
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
Unfortunately I cannot use the mod as I'm using a customized mega drop down menu.
How about google?
google search highlight current page tutorials
Basically they say the same thing.
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.
Bookmarks