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:07

Pagematch syntax?


Poster: Hirevwi
Dated: Friday October 8 2004 - 17:13:59 BST

I am having a problem getting pagematch to work correctly. I have a forum on my website with a list of categories inside the forum. The menu has a "Forum" dropdown. Inside the dropdown I get a list of the categories from my db and display them. I am trying to get the "Forum" part of my menu to change the bg color when the user is in the forum. Below is the code for the main "Forum" part of the menu.

aI("text=Forum;url=http://www.hirevwi.com/forum;showmenu=Forum;status=Main Forum Page;onfunction=showtip('<b>Check out the Forum</b>');onsubimage=http://www.hirevwi.com/images/arrow3.gif;status=Go to the Forum;pagematch=/forum/");

Also, you can view my current menu as is at http://www.hirevwi.com/forum/


Poster: Ruth
Dated: Friday October 8 2004 - 18:50:49 BST

Try removing the / before the forum. If that doesn't work, try putting in the full url for the page as you listed it here in the post. That should give you a match.

Ruth


Poster: Hirevwi
Dated: Friday October 8 2004 - 21:33:02 BST

Is there a way to have multiple pagematches for each menu item?


Poster: Ruth
Dated: Friday October 8 2004 - 23:13:25 BST

I'm not sure I understand what you mean. If you mean can you make a particular item match more than one 'pagematch' I can't figure how you could do that. If you mean having any pages under a certain item match, you could do that based on your directory structure. Let's assume a main menu item Forum, and under that item 5 submenu items call them 1, 2, 3 etc. all related to forum. Then on your site you have the root directory, and in it a folder called Forum, and in that 5 subfolders called 1, 2, 3 etc.
Then in the menu, for the main menu item you'd put agematch=url/forum; on the submenu items: item1 pagematch=url/forum/1; item2 pagematch=url/forum/2 and so on for each item. What that should do, if you go to a page from item 1 that is in forum/1/whateverpage.htm then it will keep the active highlighting. I hope that makes sense. If that's not what you mean, could you be a little more descriptive of what you're trying to do?

Ruth


Poster: John
Dated: Saturday October 9 2004 - 0:12:24 BST

/forum/ is not a page, it's a directory. Try using the actual page filename; e.g., index.php, or whatever.


Poster: Hirevwi
Dated: Saturday October 9 2004 - 0:21:42 BST

What I am trying to accomplish is to have the "forum" part of the menu match any time anything under it has a page match. Because I need to be more specific than just stating a directiory.

My thought is if I can have the main "forum" category change the bg color and arrow image, as if pagematching, anytime a page is matched that is a menu item inside the main "forum" menu item.

I am trying to accomplish this because there are other parts of my menu that the pages are in the forum/ dir. Therefore when you go to those pages the "Forum" menu item changes bg coloe and arrow images because the pagematch value is true.


Poster: Ruth
Dated: Saturday October 9 2004 - 5:25:30 BST

I just went to your site, registered and went to pit area and clicked a topic and the menu showed a page match both on the TOPIC and on the Pit Area item, so I'm not sure I understand what isn't matching?

Ruth


Poster: Hirevwi
Dated: Saturday October 9 2004 - 15:36:09 BST

Try going to the "Forum Links" part of the menu and naviagate to any of the links under that. Now you will see that the "Forum" part of the menu page matches along with whatever sub menu link you clicked under forum links. That is my problem, using a folder like "forum" for page matching is too broad in my situation.


Poster: Ruth
Dated: Saturday October 9 2004 - 21:14:41 BST

I see what's happening. You are also getting a pagematch for both forum and calender at the same time if you go to calender, because it's under the forum folder. I don't know how the setup is for a forum so I don't know what you have to do as to pages. The Forum Links category which is a main menu item is in the forum folder so it's like that should be an item under forum instead of a main menu item. I would suggest a separate folder outside the forum folder for the Forum Links pages. But, you don't have a page for that Forum Links like you do for Calendar, or Gallery, so I don't think the Forum Links item would highlight, but the pages in the forum links folder would if you use pagematch. I'm sorry I can't be more help. I don't use pagebgcolor nor pagematch. Perhaps someone who works with it more will be able to help.

Ruth