views:

53

answers:

2

I'm writing custom CMS using ASP MVC.

I'd like to let users define their own pages (views). That pages structure should be then displayed in navigation menu. So basically I'm thinking about some kind of site-navigation mechanism, which I should choose for solving that problem.

I was looking at ASP.NET Site Navigation.

Because I'd like to let the user for creating pages, I don't think, that using web.sitemap with default provider called XmlSiteMapProvider is a good idea. It is because I'd like to make modifications in that web.sitemap file during runtime. I would have to write mechanism which modifies web.sitemap xml, after user creates the new page. It means insert sepcific entries for setting page on desired position. I hesitate if it is a good idea or not.

On the other hand, I was thinking about creating custom provider (Adding dynamic nodes to ASP.NET site maps at runtime), which uses database. Using that approach, users can define new page and then save information about that page to database. After post back provider loads information from database and builds menu.

Mabye there are better solutions for that problem ? What are the bast practices for dynamic nawigation of newly created pages in CMS ?

(PS. I have already configured the dynamic routing for newly created pages, so that is not my problem.)

A: 

Have you looked at Orchard? It's a CMS up on Codeplex. It might provide you with some inspiration. I'd be surprised if they did not have the same problems as you.

Chuck Conway
Thanks, I'll try to check that. I wanted to post the question on stack overflow firstly to catch the "correct" direction of research.
Jarek Waliszko
A: 

The new 2.0 version of the MVCSiteMap project ( http://mvcsitemap.codeplex.com/ ) has a new ( and extremely well designed ) DynamicSiteMapNodeProvider functionality which can do exactly what your looking for.

As a side bonus it will also handle adding MVC controller/action based Nodes for you pretty easily.

I can't recommend this project enough. It has matured and grown up very very nicely.

jfar