Dynamic Menu with selected Link |
[eluser]MrMahi[/eluser]
Hi, I have a question how to figure out an dynamic menu. Must be easy to create a simple array für the dynamic menu. But I allthough wants to get a "selected" class when the link is on the same sitepage. Like: Menuitem => Contact. When User has clicked the Link "Contact" and is on this "Contact-Site" the Code will post an extra "selected" class to the link. Any Ideas? Sorry about my "bad" english. Best, Jens
[eluser]GrahamDj28[/eluser]
What I do is use the URI segments to match a menu item uri. When a match is found you can set the selected class.
[eluser]MrMahi[/eluser]
Old answer about the question So, I think (hope) that will do! In the end I did it this way. Looks not very genius, but works. Code: <ul id="navigation"> If u know easier and better ways please write it down. Kind regards, Jens
[eluser]GrahamDj28[/eluser]
You found the answer but you are not using it? Why? |
Welcome Guest, Not a member yet? Register Sign In |