View Full Version : Calling a MegaMenu

12-09-2011, 01:31 AM
1) Script Title: Megamenu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/ddmegamenu.htm

3) Describe problem: Not a problem, looking for a solution.

I created a megamenu http://www.ewarbirds.org/template.html using the above referenced ddmenu. The majority of my pages are static.
Can I take the megamenu and put it on a separate static page, then call it from the individual pages? I'm still learning scrpting. My site has over 2000 static pages. (I know, I'm not a php expert). My fantasy is that when I need to make a change to the menu, I make it in one spot and not have to reload 2000 pages.
How do I do this?
I thank you in advance.

12-09-2011, 02:31 PM
It really depends on how your pages are rendered. If they are SSI enabled (ie: mypage.shtml), you can use SSI (http://www.javascriptkit.com/howto/ssi2.shtml). For PHP (ie: mypage.php), there is PHP's include() function (http://ca.php.net/manual/en/function.include.php) to easily include the contents of a file across pages, and so on. The markup for the drop down menus themselves, assuming they are same across pages, can be embedded this way dynamically from one file and onto multiple pages.

12-09-2011, 07:58 PM
Thanks for the input. If they are all static pages, then I need to include the full menu for each page. I've not added php to the site, but is that the only way I can do it?