Can a collapsible menu item show a menu and link?

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
agniere
Beginner
Beginner
Posts: 4
Joined: Mon Jan 21, 2008 9:43 pm

Can a collapsible menu item show a menu and link?

Post by agniere »

I am trying to get a top level menu item in a collapsible menu to link to a page and show a menu at the same time. I have set the item up like this: "ai("text=News;showmenu=News;url=index.htm");" and it will go to the specified page and flash the submenu but the submenu closes right away. I would like it to go to the specified page and have the submenu remain open.

I am using the treemenu module 1.21 and Milonic 5.788.

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

Re: Can a collapsible menu item show a menu and link?

Post by Ruth »

Hi,

Well, since the collapsible menu opens its submenus by a click, that would not be possible. There are two ways to set up the link options

1. Set up the Main item to open the submenu and then make the first item in the sub the link to the page.

2. set it up so that when the link is clicked it goes to the page and on that page the submenu is now open.

You can do #2 using the openBranchByName function placed as the last thing before the closing body tag on the page you reach by the click. So, let's say the submenu [i.e. branch] name is water. On that water page you'd put

Code: Select all

<script type="text/javascript">openBranchByName(water); 
</script>
</BODY>
I think it may need to have a drawMenus(); in it as the following [ I don't use it, so am not sure, but you want it to 'draw' that submenu so I think so...]

Code: Select all

<script type="text/javascript">
drawMenus();  
openBranchByName(water); 
</script>
</BODY>
Hope this helps.

Ruth
Post Reply