Forums Archive Index > SmartMenus 5 > Dynamic Submenu
Date: 15 Nov 2005 8:15 pm
Here is my problem.
I have a lot of menus (20+) on one page, they each have 10 links in them. Each of the links should have 10 submenus. I built this menu structure using PHP to generate the array file and it worked, but it was very slow because the file became huge (67K). Each of the 10 submenus are all really the same exect that the URL needs one dynamic parameter changed.
Is there a way to build one submenu and pass a parameter to it that is used in the URL of the submenu item?
Another option is, can I some how create a function that will set some urls and then use javascript in the U parameter of a submenu?
This would greatly reduce the file size, yet let me have a multilevel menu.
Thanks in Advance,
john
Date: 16 Nov 2005 11:45 am
Hi,
There are a few possible solutions. Without having seen the code, I think it would be easy to do it with a simple loop and the JavaScript eval() function which would generate the definitions for the sub menus. However, I think it would really help a lot if I could take look at the code. Please send me a copy of the generated arrays file (by email) and I will try to find an appropriate solution ASAP.
Thanks!