是否有可能使用与果园CMS剃刀布局和绕过主题化 [英] Is it possible to use razor layouts with Orchard CMS and bypass the theming

查看:123
本文介绍了是否有可能使用与果园CMS剃刀布局和绕过主题化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

上下文的一点点

我们有一个由很多人使用的最近MVC4 Web应用程序,我们希望移植到果园CMS。虽然这是一个管理员类型的应用程序,我们不希望它是果园的管理部分的一部分。此应用程序是目前生活,我们想搬到果园尽可能给最终用户为不可见。

We have a recent MVC4 web application used by a lot people that we would like to port to Orchard CMS. Even though this is an "admin" type of application, we don't want it to be part of the admin section of Orchard. This application is currently live and we would like the move to Orchard to be as invisible as possible to the end-user.

我们现在所处

我们遵循这个答案如何Integrate与现有果园CMS 的ASP.NET MVC应用程序,但我们使用布局(剃刀不果园),它不与果园呈现页面(按显示的行为,而不布局控制器返回的视图的工作方式(默认) - _ViewStart.cshtml被忽略)。我试图在指定的视图方式布局的路径,但它不工作或路径并不好,因为我们是一个模块中。有没有办法告诉果园使用_layout.cshtml文件和旁路乌节主题化?

We followed this answer as how to Integrate existing ASP.NET MVC application with Orchard CMS but we use layouts (Razor not Orchard) and it is not working (by default) with the way Orchard renders pages (the views returned by the controllers actions are displayed without the layouts - _ViewStart.cshtml is ignored). I have tried to specify the path of the layout in the View method but it doesn't work or the path is not good since we are in a module. Is there a way to tell Orchard to use a _layout.cshtml file and bypass Orchard theming?

推荐答案

TL;博士不,这是不可能的。

我不喜欢回答我自己的问题,但由于伯特兰·勒罗伊评论我的问题,而不是回答它(没有硬的感觉),他是部分(或着?)果园队,我将与我所知道的回答,直到有人带有一个更好的答案。

I don't like answering my own questions but since Bertrand Le Roy commented my question instead of answering it (no hard feelings) and he is part (or was?) of the Orchard team, I will answer with what I know, until someone comes with a better answer.

据我了解,是一个果园项目的一部分是要拥抱它所有的方式,没有介于两者之间。自定义(果园)视图引擎(与区,布局,窗口小部件,形状等作品)不能绕过(后备默认MVC引擎)一个模块中。正如伯特兰德的建议,我应该将我的项目果园主题化。

From what I understand, to be part of an Orchard project is to embrace it all the way, there is no in between. The custom (Orchard) view engine (which works with zones, layouts, widgets, shapes, etc.) cannot be bypassed (fallback to default MVC engine) in a module. As Bertrand suggested, I should convert my project to Orchard theming.

这篇关于是否有可能使用与果园CMS剃刀布局和绕过主题化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆