Pagematch Problem

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Paul123
Beginner
Beginner
Posts: 2
Joined: Wed Oct 08, 2008 4:31 am

Pagematch Problem

Post by Paul123 »

Hello,

I would appreciate any help with the following. Let's say I have a page named sample.php that might also have variables passed to it, such as sample.php?cat=1

I want the menu entry labelled "Sample" to be highlighted whenever the current page is either sample.php or sample.php?cat=1. I tried using pagematch but that didn't seem to work. Here is what I have:

aI("text=Sample ;url=sample.php;pagematch=sample.php;");

Any ideas or suggestions?

Thank you,
Paul
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Pagematch Problem

Post by Ruth »

Hi,

Try this link and go down to the pagematch property. There is an explanation and it talks about different page urls much like what you want.

http://milonic.com/itemproperties.php

Ruth
Paul123
Beginner
Beginner
Posts: 2
Joined: Wed Oct 08, 2008 4:31 am

Re: Pagematch Problem

Post by Paul123 »

Ruth wrote:Hi,

Try this link and go down to the pagematch property. There is an explanation and it talks about different page urls much like what you want.

http://milonic.com/itemproperties.php

Ruth
Thanks for the reply, but I've already tried that. That example produces three instances of "Home", which is not what I'm looking for. In the Quick Reference example, I would want one instance of "Home", but highlighted whenever the URL contains index.php?cat=10.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Pagematch Problem

Post by Ruth »

Hi,

There is a style or item property called regexmatch. Now, it says that it "will force a pagematch upon any link regardless of query string or hash value" I have asked how to use it, but since there is nothing listed with it, I think you might try to put it in that item and see what happens while I wait for a response :) I'm just guessing here but since it has no explanation and is either a style or property item, I figured that maybe it might be regexmatch=1; or true [just a guess]

Ruth
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Pagematch Problem

Post by Ruth »

Hi,

Well, my guess was wrong. The regexmatch is a 'text' match so you would use it in the item and it would be regexmatch=sample.php, this should make a match whether the url shows sample.php or sample.php?cat=1.

Ruth
Post Reply