Try our conversational search powered by Generative AI!

Template Coordinator

Vote:
 

So we have upgraded a site to version 11.2 episerver cms and running into a problem in regards to the template coordinator.  It appears to be ignoring the display option tag and just falling back to the default=true value by default(of course right?).  This is all fine but appears to be ignoring my display options.  This was working before the upgrade so not sure what has changed in the decision algorithm to determine template model-> and views but curious if anyone has ran into this and what their solution was.  Attached is the template coordinator code.

  [ServiceConfiguration(typeof(IViewTemplateModelRegistrator))]
    public class TemplateCoordinator : IViewTemplateModelRegistrator
    {
public void Register(TemplateModelCollection viewTemplateModelRegistrator)
        {
viewTemplateModelRegistrator.RegisterBlock("IconBulletBlock", false, new[] { GlobalSettings.DisplayOptions.CTAIconBullet });
}
}
 public static class TemplateCoordinatorExtensions
    {
        public static void RegisterBlock(this TemplateModelCollection viewTemplateModelRegistrator, string viewName, bool availableWithoutTag, params string[] tags)
        {
            viewTemplateModelRegistrator.Add(typeof(T), new TemplateModel
            {
                Name = viewName,
                Inherit = true,
                AvailableWithoutTag = availableWithoutTag,
                Path = TemplateCoordinator.BlockPartialPath(viewName + ".cshtml"),
                Tags = tags
            });
        }
}
#186035
Dec 10, 2017 17:53
Vote:
 

Hi! 

I'm having the same issue. Have you found any workaround yet? And from which version of EPiServer did you upgrade from?

Best regards
Henrik

#186117
Dec 12, 2017 16:48
Vote:
 

Hey Henrik, I upgraded from the minor version previous to 11 so the last version in 10.  I did open a bug report to episerver as their current version 11 alloy site experiences the same issues you and I are having.  It appears you add the model to the template registrar, but it ignores it if it already exists.  I think that is fine but i don't think it checks the Tag associated with the model.  It should be    ModelType and Tag instead of just ModelType.

#186118
Dec 12, 2017 16:54
Vote:
 

Thanks for the information. It would be nice if you could keep me updated on the status of the support ticket!

#186155
Dec 13, 2017 9:16
Vote:
 

I sure will.  I got a response, but the response was links to documentation.  I sent a followup to their ticket with a response on how to replicate it again.  So hopefully, we can get an answer soon.

#186184
Dec 13, 2017 15:40
Vote:
 

Seems to be a bug alright, we will get a fix out ASAP

CMS-9294 Not possible to register multiple partial views for a content type

#186244
Dec 14, 2017 14:08
Vote:
 

Thanks Per.  Much appreciated.

#186245
Dec 14, 2017 14:12
Vote:
 

Looks like this has been fixed in 11.3 which I think comes out tomorrow or tuesday.  Thanks!

#186318
Dec 17, 2017 17:33
* 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.