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:40
Disable pagematch for specific items?
Poster: gzip
Dated: Thursday June 30 2005 - 19:24:34 BST
Hi. I have a few pages that are linked under two of my top level categories. The problem is that both categories get highlighted when I go to those pages. I only want pagematch to work under one top level category and ignore the other. I've tried the following with no success.
pagematch=/null;pagecolor=null;pagebgcolor=null;
Is it possible to do what I want? Otherwise I will be forced to remove the page from one of the categories. The nomatch option that Andy mentioned in another thread would be perfect! Btw, my styles are in a separate style sheet using the offclass, onclass, and pageclass options.
Poster: Ruth
Dated: Thursday June 30 2005 - 21:57:24 BST
Hi gzip,
I'd have to see the page and files to be able to figure out a solution. Have you tried pagematch=none? Or the option you mentioned?
EDIT: I was wondering, wouldn't using any no page match mean they wouldn't match at anytime? Have you considered duplicating the pages if there are not too many, and naming one page.htm and the other page1.htm? That way there wouldn't be the match on both categories. I think....
Ruth
Poster: gzip
Dated: Thursday June 30 2005 - 22:08:37 BST
Hi Ruth. The nomatch option works! I didn't try it because it sounded like it wasn't implemented yet, but it looks like it is now. Maybe it should be added to the documentation? Thanks.
Poster: gzip
Dated: Friday August 12 2005 - 20:22:15 BST
After all this time it turns out that nomatch doesn't work! It was simply tacking on "nomatch;" to the end of the url= option, therefore not matching that url under one of the menus.
I still need a way to achieve the no match functionality!
Poster: Ruth
Dated: Friday August 12 2005 - 22:19:13 BST
Hi,
I can't think how you would do it using pagematch. In effect you want the menu to say, if item 4 [link to page1] of submenu1 match submenu1 and the parent item of submenu 1, else if item 2 [link to page1, also] of submenu 5 match submenu 5 and the parent item of submenu 5; and also you want the code to not match the opposite item than the one clicked. That's what it seems to me. So, I think you'd need some kind of function to get that behaviour.
There is a text 'breadcrumb' function which sort of does that, but it doesn't give you the 'color' matching of the menu, rather it gives you text links in a div you've created above/below/to the side of the menu. What goes in that div are the text for the path you took in the menu to get where you were. Kind of like the big sites that have: You are here: home - books - library - view, and so on. Here's a demo of that function. That's all I can think to use. The div font color is black but you could make it whatever you wanted to code.
This will not work if you have only images as your menu items. It has to have text.
Hope that helps.
Ruth
Poster: gzip
Dated: Friday August 12 2005 - 22:33:30 BST
Thanks Ruth. I've come up with a simple solution, I wish I would have thought of it earlier. I just added an arbitrary query string to one of the menu items so it doesn't page match under the other (i.e. index.html and index.html?other).
Poster: Ruth
Dated: Friday August 12 2005 - 22:39:57 BST
Hi gzip,
Since I am illiterate on this, could you post the two different aI strings so I can see what you mean? Maybe next time I'll be able to help someone who has the same problem...
Ruth
Poster: gzip
Dated: Friday August 12 2005 - 23:08:29 BST
Sure thing.
Code:
with(milonic=new menuname("grad")){
aI("text=Course Descriptions;url=/courses/grad.php?grad;");
}
with(milonic=new menuname("courses")){
aI("text=Course Descriptions;url=/courses/grad.php;");
}
aI("text=Course Descriptions;url=/courses/grad.php?grad;");
}
with(milonic=new menuname("courses")){
aI("text=Course Descriptions;url=/courses/grad.php;");
}
Poster: Andy
Dated: Monday August 15 2005 - 15:44:48 BST
Hi,
Looks like the menu is picking up on the =/courses/grad.php part.
Try adding a dummy query string to the other menu item, like this:
Code:
with(milonic=new menuname("grad")){
aI("text=Course Descriptions;url=/courses/grad.php?grad;");
}
with(milonic=new menuname("courses")){
aI("text=Course Descriptions;url=/courses/grad.php?dummy;");
}
aI("text=Course Descriptions;url=/courses/grad.php?grad;");
}
with(milonic=new menuname("courses")){
aI("text=Course Descriptions;url=/courses/grad.php?dummy;");
}
Hope this helps,
Andy