0

我正在创建一个 Kentico 网站,并且已经阅读了教程并阅读了 Kentico MVC 的处理链接。据我了解,Kentico 鼓励开发人员使用标准 MVC 路由将页面映射到控制器。

这对于网站的某些部分来说很好,或者如果您只有几个页面,但我正在开发的网站具有很大的内容结构和许多顶级页面。

App_Start/RouteConfig.cs必须在每个顶级页面中创建自定义路由似乎是不合理的。有没有更好的方法来做到这一点?

4

2 回答 2

0

动态路由模块已在 NuGet 上发布。

对于“母亲”管理员 https://www.nuget.org/packages/DynamicRouting.Kentico/

对于 MVC https://www.nuget.org/packages/DynamicRouting.Kentico.MVC/

Github 上的文档和源代码 https://github.com/KenticoDevTrev/DynamicRouting

于 2019-11-25T15:21:15.673 回答
0

肖恩·赖特(Sean Wright)也有另一篇关于这个主题的精彩帖子。https://dev.to/seangwright/kentico-12-design-patterns-part-10-mvc-routing-with-nodealiaspath-22l3

我建议也检查一下。

于 2019-08-14T16:55:48.853 回答