views:

28

answers:

0

Consider a project with 2 Areas.

/Areas/Blog /Areas/Dashboard

Now say that my Blog area has an editor for the type SpecialBlog. /Areas/Blog/Views/Blog/EditorTemplates/SpecialBlog.ascx

What if a view that is part of my Dashboard Area would like to display a special blog?

The following code works from Views inside the "Blog" Area but not from the "Dashboard" Area.

Html.EditorFor (model => model)  // model is type SpecialBlog

Even providing the path fails,

Html.EditorFor (model => model, "~/Areas/Blog/Views/Blog/EditorTemplates/SpecialBlog.ascx")

The one thing I can get working is

Html.RenderPartial (Model, "~/Areas/Blog/Views/Blog/EditorTemplates/SpecialBlog.ascx");

But any routing within the SpecialBlog then fails. (ie. it has its own Html.EditorFor calls to other editor templates in the Blog Area).

Am I doing something fundamentally wrong?