Pagematch syntax?

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Hirevwi
Beginner
Beginner
Posts: 4
Joined: Fri Oct 08, 2004 5:04 pm

Pagematch syntax?

Post by Hirevwi »

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/
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

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
Hirevwi
Beginner
Beginner
Posts: 4
Joined: Fri Oct 08, 2004 5:04 pm

Post by Hirevwi »

Is there a way to have multiple pagematches for each menu item?
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

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
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

/forum/ is not a page, it's a directory. Try using the actual page filename; e.g., index.php, or whatever.
John
Hirevwi
Beginner
Beginner
Posts: 4
Joined: Fri Oct 08, 2004 5:04 pm

Post by Hirevwi »

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.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

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
Hirevwi
Beginner
Beginner
Posts: 4
Joined: Fri Oct 08, 2004 5:04 pm

Post by Hirevwi »

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.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

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
Post Reply