Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:57

Highlighting Current Pages


Poster: kidburla
Dated: Monday August 14 2006 - 23:14:19 BST

Hi, I am considering implementing the DHTML Menu for a rather large menu system being used on a PHP/MySQL-driven site. I am wondering if there is any facility in the software (or plugin for the software) which allows me to highlight the current page the user is on (and its parent(s)) in a similar way to how the menu system on the main Milonic site is done.

One way to do this would be to dynamically re-generate the menu_data file from a database each time the page is loaded. However this is rather time-consuming, especially due to the size of the menu and the fact that this operation would most likely be running more than once at the same time, as different users access the site.

My current idea for an implementation is to have some script which re-generates a static menu_data.js every time the content of the site is changed, which is a lot less often than page loads by users. However this approach would not enable me to implement highlighting as detailed above. I am hoping there is some way to implement "highlighting of the current page" in the actual JavaScript code.

Thanks,

Adam.


Poster: Ruth
Dated: Tuesday August 15 2006 - 0:02:34 BST

Hi,

There are menu properties which have page as part of their name i.e. pagebgcolor, pagecolor, pagebgimge, pageimage etc. Those are the 'highlighting -you are here' properties. Below my name are some links to the menu properties style, menu and item. The page one can be both a style property and an item property. Take a look at the Quick Reference guide. Hope this helps.

Ruth


Poster: kidburla
Dated: Tuesday August 15 2006 - 11:10:25 BST

Okay that's great; pagebgcolor etc. However I now want to ask: is there any plugin/script modification etc, which allows me to modify the way which the current page URL is compared to the URL in menu_data?

I have URLs of the form:

http://somedomain.org/somescript.php?page=foo&show=bar

Now I want to distinguish between "page" variables but not "show" variables.

e.g.
http://somedomain.org/somescript.php?pa ... &show=bar1
http://somedomain.org/somescript.php?pa ... &show=bar2

are classed as the same, but

http://somedomain.org/somescript.php?pa ... &show=bar1
http://somedomain.org/somescript.php?pa ... &show=bar1

are different.

Any way to implement this? I have looked at the JS Source, but it seems obfuscated, to say the least.

Adam.


Poster: Ruth
Dated: Tuesday August 15 2006 - 11:21:45 BST

Hi,

I'll post to Milonic about this because I have no idea :?

This is not an open source product. You cannot modify/alter the program files. Only the menu_data file is user editable.

Ruth


Poster: kidburla
Dated: Wednesday August 16 2006 - 0:41:46 BST

Ruth wrote:
Hi,

I'll post to Milonic about this because I have no idea :?



Thanks, that'd be great!

Quote:
This is not an open source product. You cannot modify/alter the program files. Only the menu_data file is user editable.

Ruth


Sorry! I didn't realise that I wasn't allowed to modify the source. I had thought of trying to modify the source code for my needs and then crediting Milonic with the original, but this is clearly not an option. I will not pursue this line of thought further.


Poster: kidburla
Dated: Wednesday August 23 2006 - 23:08:26 BST

Hi,

Any more news on this?


Poster: Andy
Dated: Thursday August 24 2006 - 11:00:56 BST

Hi,

Have you tried the pagematch property?

This should enable you to declare a keyword to force a match.

You could declare this in PHP and pop it into the menus style, something like this:

pagematch="page=foo1";

Hope this helps,
Andy