View Full Version : Accordion Menu Current Location

05-01-2008, 05:16 PM
1) Script Title: Accordion Menu script (v1.3) (glossy version)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ddaccordionmenu.htm

3) Describe problem: Another question/request regarding the accordion menu. Still love it, works great, but my customer is requesting an indicator of some sort, class background color change, image, etc, that indicates the menu page location. For example, a link in the menu targets "page1.htm". When the target page is reached the menu section is expanded and the menu now highlights the "page1.htm" item. Now I know I could manually go into each page and make the modifications but I would prefer some sort of script based solution that would handle it automatically. Does anyone know of a quick and easy solution?
Thanks in advance.

05-01-2008, 06:56 PM
There's no existing modification for this yet unfortunately. When you get down to it, this really is a question separate from Accordion Menu itself, as you're basically looking for a way to highlight the currently selected menu link based on the current page's URL. It could be any menu, or even just a bunch of links on the page. How you go about it really depends on how the client's site is set up (ie: dynamically served), or how "accurate" you want the menu link to URL matching to be (ie: you can use JavaScript to try and match up a menu link's URL to the page's URL, but it's unreliable at best).

05-01-2008, 07:14 PM
The menu is being built and served dynamically so probably my best chance is to try and work it from that angle. I pretty much figured that out once I posted the message but was then just curious if there was another way.
Thanks again for all the help.