N2CMS and dropdown navigation menu
I'm using the N2 CMS and I'd like to create the dropdown javascript menu.
Only these two options come to my mind:
- Create a new page type which represents the dropdown menu.
- Recursively load all pages and dynamically generate the menu.
I guess that there is a much better solution but I could not find anything on the Internet.
Problems with these two options are:
If I choose option 1, than I can not control the access rights and published status.If I choose the option 2, t开发者_JAVA百科han I'll have many hits to database just to generate the menu.
Any help would be greatly appreciated!
Option #2 is the way to go. Having many hits to your database is not a problem. CMS systems and RDBMS systems are made exactly for this purpose - to fetch data and to sustain reasonably high load. As your site starts to grow, and you get more and more visitors, drop down menu will definitely not be weakest link of your site, you will be certainly experiencing problems with other segments of your site.
Anyway, N2CMS is highly optimized and runs on NHibernate which has its own caching mechanism too, so go ahead with fetching site tree.
精彩评论