Is it possible to highlight main menu items from a submenu?

Please note that official support for this menu version has now ceased. There are still plenty of users, though, and the forum is still running. Some of our long-time users may be able to help you out.
Post Reply
User avatar
4viggo
Super Advanced
Super Advanced
Posts: 56
Joined: Wed Jun 12, 2002 12:03 pm
Location: Norway

Is it possible to highlight main menu items from a submenu?

Post by 4viggo »

I would like to highlight the top menu (and the path all the way down) from accessing a page deep down in my submenu?

The "Current Page Item Font Color" and "background color" settings work fine for the menu items having no submenus but when accessing a page in a submenu it does not highlight the parrent top menu item.

Help!
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

There is a download at http://www.milonic.co.uk/menu/madtoaste ... 3.5.02.zip that will do what you want.

Although not fully supported by Milonic this will appear as standard in version 4 later next year.

Regards
Andy
User avatar
4viggo
Super Advanced
Super Advanced
Posts: 56
Joined: Wed Jun 12, 2002 12:03 pm
Location: Norway

Post by 4viggo »

Thanks Andy :D

regards
4viggo
Stan
Advanced
Advanced
Posts: 11
Joined: Tue Mar 04, 2003 3:29 am
Location: Montréal, Canada
Contact:

What do I need to do?

Post by Stan »

Hi:

I would like very much to reproduce this behaviour. Please tell me what is special about this menu_array.js file and produces this behaviour?

Stan :?
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi Stan,

Hope you don't mind me jumping in. The changes do not affect the menu array file (your current menu_array.js will be just fine). The "mad toaster" functionality is produced by additional code in mmenu.js, added by another user. The download Andy provided will include a different mmenu.js file that you can try using. Note, however, that it is version 3.5.02, so it will not have the latest small changes from 3.5.03 - 3.5.12 (you can see the list of additions here).

Hope that helps,

Kevin
Stan
Advanced
Advanced
Posts: 11
Joined: Tue Mar 04, 2003 3:29 am
Location: Montréal, Canada
Contact:

One little glitch...

Post by Stan »

Thanks for your reply Kevin,

I got it working fine now, except if I use a "swapimage" setting on a sub menu item (which I guess was the cause of my problem). Any fix or workaround would be greatly appreciated! :)

Stan
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Stan,

What exactly happens (or doesn't) when you use a swapimage? Menu highlighting stops working? Can you provide a URL to the site in question?

Kevin
Stan
Advanced
Advanced
Posts: 11
Joined: Tue Mar 04, 2003 3:29 am
Location: Montréal, Canada
Contact:

Post by Stan »

Kevin,

Sorry, this is not yet on air. I will try to upload as soon as possible, perhaps later this week.

In a simple two-level menu structure, if I use an entry like the following in a sub-menu:

Code: Select all

,"<img src=menu315x15.jpg border=0>&nbsp;La fábrica de sueños","LaMatatena-470.htm",,"La fábrica de sueños",1
everything goes well, and the sub-menu of the page is highlighted in the main menu whenever the page is displayed.

In contrast, if I use the following entry:

Code: Select all

,"<img src=menu315x15.jpg border=0>&nbsp;La fábrica de sueños","LaMatatena-470.htm swapimage=MatatenaRoja15.gif",,"La fábrica de sueños",1
the sub-menu of the current page is not highligthed in the main menu (but the whole menu is otherwise behaving correctly, including the image swapping).

Stan
Stan
Advanced
Advanced
Posts: 11
Joined: Tue Mar 04, 2003 3:29 am
Location: Montréal, Canada
Contact:

Post by Stan »

Hi Kevin:

You can reproduce the problem simply by replacing the following entry in the menu_array.js file provided by madtoaster:

Code: Select all

addmenu(menu=["m_company",,,120,1,"",style2,,"left",effect,,,,,,,,,,,,
,"&nbsp;&nbsp;&nbsp;&nbsp;Form","main_2_1.htm",,"Form",1
])
with this one:

Code: Select all

addmenu(menu=["m_company",,,120,1,"",style2,,"left",effect,,,,,,,,,,,,
,"<img src=arrow.gif>&nbsp;&nbsp;&nbsp;&nbsp;Form","main_2_1.htm swapimage=arrowdn.gif",,"Form",1
])
Stan

P.S. The script seems to ignore that the url may be followed by alternate actions...
reds
Beginner
Beginner
Posts: 4
Joined: Fri Feb 28, 2003 4:40 pm

Post by reds »

Hi,
question :
is it possible to use the highlight current item when not all pages are set in thye root, but in separate folders ?

help would be greatly appreciated !!

Björn
Stan
Advanced
Advanced
Posts: 11
Joined: Tue Mar 04, 2003 3:29 am
Location: Montréal, Canada
Contact:

Post by Stan »

reds wrote:Hi,
question :
is it possible to use the highlight current item when not all pages are set in thye root, but in separate folders ?

help would be greatly appreciated !!

Björn
I am not sure that I use the best technique, but I use a different menu_array.js in each folder... somewhat cumbersome, but it works. :|

Stan
reds
Beginner
Beginner
Posts: 4
Joined: Fri Feb 28, 2003 4:40 pm

Post by reds »

When you give your full path in the menu_array.js, you're able to use one menu_array.js
Stan
Advanced
Advanced
Posts: 11
Joined: Tue Mar 04, 2003 3:29 am
Location: Montréal, Canada
Contact:

Post by Stan »

Thanks Reds, this works fine. :)

Stan
Stan
Advanced
Advanced
Posts: 11
Joined: Tue Mar 04, 2003 3:29 am
Location: Montréal, Canada
Contact:

Current page not highlighted when loaded at an anchor

Post by Stan »

It seems that if a page is loaded at a specific anchor (page.htm#anchor), then the current page is not highlighted in the menu (in my case, the anchor is not specified in the menu, but in a link from another page). Anyone experienced the same behaviour?

Stan
Stan
Advanced
Advanced
Posts: 11
Joined: Tue Mar 04, 2003 3:29 am
Location: Montréal, Canada
Contact:

Post by Stan »

kevin3442 wrote:Stan,

What exactly happens (or doesn't) when you use a swapimage? Menu highlighting stops working? Can you provide a URL to the site in question?

Kevin
Kevin,

Here is the url: http://www.lamatatena.org/

You will notice that the second-level menu items do not have any swapimage, because when I specify one they stop highlighting the main menu.

Stan
Romeo
Advanced
Advanced
Posts: 25
Joined: Fri Jul 05, 2002 11:30 pm

Doing an update ?

Post by Romeo »

Do you know if anyone has added the "mad_toaster" addition to the later versions of the mmenu.js file or is it a wait for version 4?
astoorian
Beginner
Beginner
Posts: 5
Joined: Sat Apr 05, 2003 4:06 pm

Post by astoorian »

Andy wrote:There is a download at http://www.milonic.co.uk/menu/madtoaste ... 3.5.02.zip that will do what you want.

Although not fully supported by Milonic this will appear as standard in version 4 later next year.

Regards
Andy
I've tried using the madtoaster file but no joy. The problem is with any page located in a subdirectory of the root directory, I get no highlighting of either the submenu or top menu items for these pages.

The only semi-weird thing I think I'm doing is that I'm using 2 menu_array files -- the only difference between the 2 is the path names used for the images and urls. Because my server doesn't seem to support root-relative links (e.g. /img/image.gif) I'm using relative links (e.g. img/image.gif), so the menu_array file loaded for pages in the root directory has links like "img/image.gif", while pages in a subdirectory use a menu_array_1 file that specify "../img/image.gif"

Hope the preceeding makes sense. Any help would be appreciated. There is a test server at home.cogeco.ca/~gastoorian/home.htm. (note that below the top level of menus only the "submenu test" items actually point anywhere).
Stan
Advanced
Advanced
Posts: 11
Joined: Tue Mar 04, 2003 3:29 am
Location: Montréal, Canada
Contact:

Post by Stan »

Astoorian,

You seem to execute a version of mmenu.js (in your lib/java) that does not contain the madtoaster additions? I get a page not found on the other mmenu.js specified in your page.

Stan

P.S. I got this to work but only with root relative url's.
astoorian
Beginner
Beginner
Posts: 5
Joined: Sat Apr 05, 2003 4:06 pm

Post by astoorian »

Stan,

Thanks for having a look. The mmenu.js there now does have the extensions, but maybe when you hit it I hadn't updoaded the new file yet. I fixed the other thing you mentioned as well, but still no highlight colour on subdirectory pages.

Gregg
Stan
Advanced
Advanced
Posts: 11
Joined: Tue Mar 04, 2003 3:29 am
Location: Montréal, Canada
Contact:

Post by Stan »

Post Reply