MVC和一把umbraco整合 [英] MVC and Umbraco integration

查看:309
本文介绍了MVC和一把umbraco整合的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经按照从 HTTP步骤:// memoryleak .me.uk / 2009/04 /一把umbraco和-ASPNET,mvc.html 和一把umbraco MVC整合成功,但我仍然有一个问题,是至关重要的我。

I've followed the steps from http://memoryleak.me.uk/2009/04/umbraco-and-aspnet-mvc.html and integrated MVC in Umbraco with success, but I still have a problem which is critical for me.

有没有办法继承一把umbraco定义的模板中的MVC看法?
据我了解的问题是,一把umbraco模板只能在运行和性能DOCTYPE HTML变得如 @nodeName ,不承认和对象空引用异常被抛出,因为这一点。

Is there any way to inherit the Umbraco defined templates in an MVC view? As I understand the problem is that the Umbraco templates become HTML only at runtime and the doctype properties, as @nodeName, are not recognized and "Object null reference" exception being thrown because of this.

感谢您!

推荐答案

有过一看博客文章似乎这是不实际集成了一把umbraco但旁边一把umbraco工作。

Having had a look at the blog post it seems that this is not actually integrated with Umbraco but working alongside Umbraco.

在它实际上是它自己的HttpHandler。这意味着它绕过了一把umbraco的HttpHandler和与模板和CMS本身一大堆一把umbraco功能。

In that it is effectively its own HttpHandler. This means it is bypassing the Umbraco Httphandler and a whole bunch of Umbraco functionality relating to templates and the CMS itself.

获取MVC利用一把umbraco模板是(可能)不可能没有修改(版本4+)的核心应用。然而,这并不意味着你不能用一把umbraco充当一个MVC应用程序内容存储库使用MVC旁边一把umbraco。

Getting MVC to utilise Umbraco templates is (probably) not possible without modifications to the core application (in version 4+). However that doesn't mean you can't use MVC alongside Umbraco with Umbraco acting as a content repository for a MVC application.

您可以轻松地创建MVC控制器从一把umbraco拉的数据,并提出它们提供给您的意见。例如,你可以使用一把umbraco Linq2Umbraco这一点。

You could easily create MVC controllers which pulled data from Umbraco and made that available to your views. For example you could use Umbraco Linq2Umbraco for this.

如果你提供更多的细节,以你得到,你正在努力实现的到底是什么,这可能是解决方案中的precise错误是你如何构建你的应用程序,而不是试图蛮力一把umbraco 4+到做一些事情,将在5一把umbraco(这是定于发布一段时间了,今年)原生。该人士$ ​​C $ C 5是 codePLEX 并可能是一个好地方一看,看到了一把umbraco核心团队是如何接近这一点。

If you give more details as to the precise errors you are getting and exactly what you are trying to achieve, it may be the solution is in how you structure your application rather than attempting to brute force Umbraco 4+ to do something that will be native in Umbraco 5 (which is scheduled for release some time this year). The source code for 5 is on Codeplex and may be a good place to have a look and see how the Umbraco core team are approaching this.

有关于这一个古老的讨论,在这里:的http://论坛.umbraco.org / yaf_postst5106_Using-ASPNET-MVC-与-Umbraco.aspx

There is an old discussion about this here: http://forum.umbraco.org/yaf_postst5106_Using-ASPNET-MVC-with-Umbraco.aspx

和最近在这里:<一href=\"http://our.umbraco.org/forum/getting-started/installing-umbraco/2668-Use-Umbraco-with-aspnet-MVC\" rel=\"nofollow\">http://our.umbraco.org/forum/getting-started/installing-umbraco/2668-Use-Umbraco-with-aspnet-MVC

进一步讨论可以在这里找到:的http://our.umbraco.org/forum/developers/extending-umbraco/17523-Umbraco-461-and-MVC-3

Further discussion can be found here: http://our.umbraco.org/forum/developers/extending-umbraco/17523-Umbraco-461-and-MVC-3

更在这里:
<一href=\"http://our.umbraco.org/forum/developers/extending-umbraco/6837-Umbraco-Website-And-MVC-Website-In-ONE\" rel=\"nofollow\">http://our.umbraco.org/forum/developers/extending-umbraco/6837-Umbraco-Website-And-MVC-Website-In-ONE

这篇关于MVC和一把umbraco整合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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