SaaS CMS has officially launched! Learn more now.

IViewTemplateModelRegistrator with custom IViewLocationExpander

Vote:
 

Hi,

I'm trying to get partal view paths registered in IViewTemplateModelRegistrator to work, while I also have a custom IViewLocationExpander to find views in a feature folder structure, similar to Foundation, but I've written my own a bit differently.

When I call PropertyFor with a Tag, I get a call to my ViewLocationExpander with a viewName on the form "PageTypeName.TagName" in the context, so if I for exampe name my view the same as the Tag its easy enough to resolve. But I would prefer to be able to use the Path defined for the Type and Tag in the TemplateModelRegistrator. That doesn't seem to be used at all. Shouldn't the framework look for registered paths before moving on to a ViewLocationExpander? I'd think hardcoded, registered paths would be much more accurate. 

#290397
Oct 21, 2022 13:24
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.