Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:27
Multiple menus for diff. pages in same data file
Poster: bklewis
Dated: Wednesday October 17 2007 - 23:11:16 BST
I'm building a site that has a top menu with pull down menus. Depending on what the viewer selects it loads a unique side menu specific to that page. I want to keep all the side menus in one data file. I know there must be an easy way to do this, but haven't found the answer after searching your site thoroughly.
I can get what I want to work currently by building a side menu for every page and calling that side menu on the page. Example:
<script type="text/javascript" src="../common/menu_news.js"></script>
This seems really inefficient. There must be a way to "name" each of the menus and create a master side menu. Then call the "name" from the individual page.
As you might be able to tell, I'm not a programmer, but do understand it. Can you help?
Re: Multiple menus for diff. pages in same data file
Poster: Ruth
Dated: Wednesday October 17 2007 - 23:49:03 BST
Hi,
I'm not a programmer either, nor do I do coding. That said, and my explanation may be long because I'm not sure of programming stuff...it would seem that what you need is a main menu at the side, with say one 1 item in it, let's call it Page Menu or something like that. So at the side on each page you have that as always visible. Now, in that data file you have all these side menus. OK, normally you would have the aI in the main menu that calls a showmenu
Code:
aI("text=Page Menu;showmenu=sidemenu;");
The problem of course is that showmenu will look for a menu that says sidemenu, but you want it to look for sidemenu1, or 2 or 3 or whatever goes on that page, so somehow you have to get the showmenu code to accept a variable [I think] or you have to get the name sidemenu to have a js script that changes it based on the page to the correct one for that page. Something like [and I'm making this up] showmenu=call the function here to get the menu name; Then you'd need some kind of function that searched for the page url and then said which menu to get.
If that is what you're trying to do, I don't know if it is possible, but there is no volunteer on the board now who does that kind of thing. You would have to contact Milonic directly for help like that. If you have a professional or above license and it is current you can go to the main site and at the bottom click the text link Tech Support. That will take you to a support system to fill out a ticket. You must be logged in under the license log in name.
There is a module called openmenusbyurl; the problem is it requires a showmenu= in a main menu. Again, to do what you want somehow you have to get the showmenu= to call a function which figures out which menu to open instead of having a showmenu=menuName; I think. Since I'm not a programmer I could be way off base here and there might be some really simple way to do it, though I can't think of one.
Ruth
Re: Multiple menus for diff. pages in same data file
Poster: Ruth
Dated: Wednesday October 17 2007 - 23:56:44 BST
I forgot to post a link for you to something called methods and functions
http://www.milonic.com/menu_methods.php
I don't know if you do functions or not, I don't so I don't know if this is possible. There's one called menuDisplay. You have to reference a menu, but maybe that could be set to reference a variable to get the menu name based on the page???
Ruth
Re: Multiple menus for diff. pages in same data file
Poster: bklewis
Dated: Thursday October 18 2007 - 1:03:07 BST
Thanks for the answer. I'll do some more experimenting using your suggestions.