Forums Archive Index > SmartMenus 5 > Dynamic menu content

Author: RLFitch

Date: 30 Sep 2005 3:40 pm

I have a site with large number of menu items that are static, but I need to create a set of menu items that are 'dynamic'. Thru external programming, I can create a file with the JS arrays for the content but I don't know how to include this. This content would change at irregular intervals (from 1 hour to 1 week). I'm also concerned that either web server or browser caching may be a problem and require the user to perform a 'full refresh', which is not desirable.

Thanks for any suggestions,

Ransom Fitch
--> http://rlfitch.dyndns.org


Author: smartmenus

Date: 1 Oct 2005 3:42 am

Hi Ransom,

I think in your case it would be best to do the following- first please take a look at the following topic- --> http://www.smartmenus.org/forum/viewtopic.php?t=68 . I have posted a guide there which will help you learn how you could define some of your menus directly in the source of your pages.

You could use this technique and define your "dynamic" menus directly in the source of your pages. You can leave all your definitions for the "static" menus in your definitions file (e.g. s_arrays.js). This way you will still have the majority of your definitions in the static cacheable definitions file and there won't be a cache problem. Of course, this would be the case if you don't have too many menus that have to be dynamic (e.g. you don't have to add too much code to your pages).

I hope this helps. Please let me know if you have any questions..