[英]Sitemap in MVC3 without using any third party tool
I am trying to create a sitemap in Asp.Net MVC3.我正在尝试在 Asp.Net MVC3 中创建站点地图。
Is there any control given by Microsoft to create a sitemap in MVC3 using Razor view Engine? Microsoft 是否提供任何控制以使用 Razor 视图引擎在 MVC3 中创建站点地图?
If not then, is it possible in MVC3 to to create a sitemap, without using any third party tool like Nuget MvcSiteMapProvider Package?如果没有,是否可以在 MVC3 中创建站点地图,而无需使用任何第三方工具,例如 Nuget MvcSiteMapProvider Package?
You can always roll your own, which is what I do, but here are some existing implementations:你总是可以推出自己的,这就是我所做的,但这里有一些现有的实现:
https://github.com/maartenba/MvcSiteMapProvider https://github.com/maartenba/MvcSiteMapProvider
http://keyvan.io/sitemap-action-result-for-asp-net-mvc http://keyvan.io/sitemap-action-result-for-asp-net-mvc
I use something similar to the second implementation and it has worked very well for me.我使用了类似于第二个实现的东西,它对我来说效果很好。
Before I started contributing to MvcSiteMapProvider , I searched for an answer myself and came to the conclusion the answer is no .在我开始为MvcSiteMapProvider做贡献之前,我自己搜索了一个答案,得出的结论是,答案是否定的。 Microsoft didn't provide any built-in way to build a sitemap, search engine sitemaps files, or SiteMapPath controls in ASP.NET MVC, all of which MvcSiteMapProvider does.
Microsoft 没有提供任何内置方法来构建站点地图、搜索引擎站点地图文件或 ASP.NET MVC 中的 SiteMapPath 控件,所有这些都是 MvcSiteMapProvider 提供的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.