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.
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.