开发者

ASP MVC Sitemap with MvcSiteMap

MvcSiteMap - https://github.com/开发者_Python百科maartenba/MvcSiteMapProvider [originally at: 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?


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 at the project wiki entry on defining sitemap nodes in code. 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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜