Disable pagematch for specific items?

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
gzip
Beginner
Beginner
Posts: 7
Joined: Thu Jun 30, 2005 7:09 pm

Disable pagematch for specific items?

Post by gzip »

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

Post by Ruth »

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
gzip
Beginner
Beginner
Posts: 7
Joined: Thu Jun 30, 2005 7:09 pm

Post by gzip »

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.
gzip
Beginner
Beginner
Posts: 7
Joined: Thu Jun 30, 2005 7:09 pm

Post by gzip »

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

Post by Ruth »

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
gzip
Beginner
Beginner
Posts: 7
Joined: Thu Jun 30, 2005 7:09 pm

Post by gzip »

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

Post by Ruth »

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
gzip
Beginner
Beginner
Posts: 7
Joined: Thu Jun 30, 2005 7:09 pm

Post by gzip »

Sure thing.

Code: Select all

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;");
}
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

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: Select all

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;"); 
}
Hope this helps,
Andy
Post Reply