Is it possible to specify the full path of a Display or Editor template?
For example, I have the following model:
public class ParentModel
{
public class ChildModel { get; set; }
}
I have a ParentController and a ChildController and I would like to put the Child display template view in the Views/Child/DisplayTemplates/ChildModel.cshtml and the ParentModel.cshtml view in Views/Parent/DisplayTemplates/ParentModel.cshtml.
Right now it can't find the Child display template because it is looking in Views/Shared and Views/Parent.
Is it possible to specify the full path of a Display Template or write an HtmlHelper that can specify the folder(s) to look in?
I have figured out a way that works with only one slight drawback:
I created the following folder:
Views\Shared\DisplayTemplates\Childand placedChildModel.cshtmlin the folder. The drawback to this is that it no longer uses the model name to determine the template name and I imagine it is probably ignoringUIHintas well, but it does allow me to organize my Shared display templates a little better.