开发者

N2CMS and dropdown navigation menu

开发者 https://www.devze.com 2023-02-23 00:01 出处:网络
I\'m using the N2 CMS and I\'d like to create the dropdown javascript menu. Only these two options come to my mind:

I'm using the N2 CMS and I'd like to create the dropdown javascript menu.
Only these two options come to my mind:

  1. Create a new page type which represents the dropdown menu.
  2. 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号