Forcing Menu to pagecolor & pagebgcolor

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
bling69
Beginner
Beginner
Posts: 5
Joined: Fri Jul 16, 2004 2:47 pm

Forcing Menu to pagecolor & pagebgcolor

Post by bling69 »

:D

Hi Folks,
I have an issue with implementing this wonderful menu.
At present, due to the way I have had to build the menu data in the jsp, when a sub-menu item is clicked, the top level item does not change from offbgcolor & offcolor to pagecolor & pagebgcolor. This works correctly when the top level is selected.
Is there a method for forcing a top level menu item to set to pagecolor & pagebgcolor?
I can easily identify the correct menu item but need to get the correct function to or property to set.
Thanks
Bling (First time user first time poster)
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

The property pagematch=mypage.html;

will match the page for you.
Or a script for more than one page?
maz
bling69
Beginner
Beginner
Posts: 5
Joined: Fri Jul 16, 2004 2:47 pm

Post by bling69 »

Thanks Maz, I will let you know how I get on.
Bling :D
bling69
Beginner
Beginner
Posts: 5
Joined: Fri Jul 16, 2004 2:47 pm

Post by bling69 »

Hi again, I am still having troubles.
I made a mistake in my first posting.
When a user clicks on the top level of the menu a new page opens. On that page are "Editorial" links. The Editorial links are grouped together logically to the top level menu options but have no reference in the menu.

When using Milonic Menu at the moment when an Editorial link is clicked the menu loses the pagecolor & pagebgcolor, which is fair enough.

So what I am trying to do is force the pagematch to be the same URL as the Editorial.

The URL I am trying to use pagematch with is as follows,
This is a dynamically created and I managed to get the correct values into the aI() code when the Javascript is run by using the following;

Code: Select all

aI("text=Business Management;url=/intranet/editorial/list.do?id=8;showmenu=Links1;pagematch="+location.href+";");
with location.href =
is this the correct way of working with pagematch?
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

It looks like it might work, there were some posts similar to that, but what you shouldn't do in a menu item, is the quotes "", so take out the quotes and see if that works.

Otherwise someone who knows backend, php or whatever it is, will have to help you.

maz
bling69
Beginner
Beginner
Posts: 5
Joined: Fri Jul 16, 2004 2:47 pm

Post by bling69 »

Hi again,
I couldn't get the above to work so I had a fresh look at it and decided to do the following.
As I know which menu has been selected I simply change the colour of that menu when I generate it by using the code below, (this is JSP but I am sure you could use this in php etc):

Code: Select all

<logic:iterate id="websitearea" name="websiteareas" indexId="webIndex">
<logic:equal name="websitearea" property="id" value="<%= String.valueOf(thisId) %>">
	aI('text=<bean:write name="websitearea" property="name"/>;url=/intranet/editorial/list.do?id=<bean:write name="websitearea" property="id"/>;showmenu=Links<%= (1+webIndex.intValue()) %>;offbgcolor=#990000;offcolor=white;');
</logic:equal>

<logic:notEqual name="websitearea" property="id" value="<%= String.valueOf(thisId) %>">
	aI('text=<bean:write name="websitearea" property="name"/>;url=/intranet/editorial/list.do?id=<bean:write name="websitearea" property="id"/>;showmenu=Links<%= (1+webIndex.intValue()) %>;');
</logic:notEqual>
</logic:iterate>
So just change the foreground and text colour to the highlight coulours when it is needed, not to pretty but jobs a good'n'!
Bling
:)
Post Reply