views:

149

answers:

1

MvcSiteMap - http://mvcsitemap.codeplex.com/

Is it possible to create such links in a sitemap with MvcSitemap? I can create a simple sitemap but not one with the link below..

www. ... .com / Eventname / groupID /Tasks/ Details/ taskID

Eventname, groupID, TaskID are dynamic.

If not is there another solution for my problem?

TY in advance.

A: 

I know this answer comes a little late, but I've just picked up on MvcSitemap myself in the last week and am using it as per the OP's question in my own project.

It's certainly achievable. You can define sitemap nodes by creating a custom node provider, within which you pass in the route values for each node, based on the custom route you mentioned. Even version 1 of MvcSiteMap allowed for dynamic nodes, but v2.0 seems a lot more flexible - and it supports MVC2 Areas.

Have a look here for more details. The sample project is pretty good too. If you only have SQL Express installed, you may need to grab the DB files from the original MVCMusicStore project as the DB files included with the MvcSiteMap sample will only work on paid versions of SQL server.

Daniel.S