【发布时间】:2014-07-25 14:31:01
【问题描述】:
如何将其“翻译”到果园
routes.MapRoute(
name: "Durandal App Views",
url: "App/views/{viewName}.cshtml",
defaults: new { controller = "DurandalView", action = "Get" }
);
我尝试根据this 制作主题。
它不起作用并破坏了所有 Orchard 站点
public class Routes : IRouteProvider {
public void GetRoutes(ICollection<RouteDescriptor> routes) {
foreach (var routeDescriptor in GetRoutes())
routes.Add(routeDescriptor);
}
public IEnumerable<RouteDescriptor> GetRoutes()
{
return new[] {
new RouteDescriptor {
Priority = 5,
Route = new Route(
"/App/views/{viewName}.cshmtl",
new RouteValueDictionary {
{"area", "Durandal"},
{"controller", "DurandalView"},
{"action", "Get"}
},
new RouteValueDictionary(),
new RouteValueDictionary {
{"area", "Durandal"}
},
new MvcRouteHandler())
}
};
}
}`
【问题讨论】:
-
它是如何不起作用的,它是如何破坏网站的?
-
你也可以给我们看看你的控制器吗?
标签: routes orchardcms