For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > November 2005 > Best way to change menu if on current page?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Best way to change menu if on current page?
Karl Timmermann

2005-11-07, 7:25 pm

Hi all,

I have a nav bar with 4 links. Right now, I assign the 4 links
(titles and url) to a smarty var named "topmenu", and in the
template, I use a {section} loop to display them. First of all, is
the section loop appropriate for this use, or should I use something
else? Second, I want the link to be a different color, and not be a
link if the user is on that page. How should I do this?

Also, should I even be defining the links in PHP? I had to for
another menu on the same page because the links come from a database.

Thanks!
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com