如何延长MVC的地方寻找意见 [英] How to extend where MVC looks for views

查看:125
本文介绍了如何延长MVC的地方寻找意见的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我具有离散的模块的概念的应用。这些模块将生活在模块文件夹。每个模块都会有一个文件夹下,该模块文件夹。然后,这些模块文件夹将下面有一个控制器和视图文件夹,非常类似于领域是如何工作的。



我想延长/更改被搜索使搜索位置当我的模块控制器返回新的位置将被搜索的景色。



我想这将需要涉及一个自定义视图引擎,但我不确定具体情况。是否有一个具体的ViewEngine我可以延长,或者我需要从头开始写一个新的。



时编写自定义视图引擎以正确的方式去,还是有更好的途径?


解决方案

我想这将需要涉及一个自定义视图引擎




正确的思想


I an application that has a concept of discrete modules. These modules will live in Modules folder. Each module will have a folder under this Modules folder. These module folders will then have a Controllers and Views folder under them, very similar to how Areas work.

I would like to extend/change the search locations that are searched so that when my module controllers return a view the new locations will be searched.

I am thinking this will need to involve a custom ViewEngine, but I am uncertain of the specifics. Is there a specific viewengine I can extend, or do I need to write a new one from scratch.

Is writing a custom view engine the right way to go, or is there a better route?

解决方案

I am thinking this will need to involve a custom ViewEngine

Correct thinking.

这篇关于如何延长MVC的地方寻找意见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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