Try our conversational search powered by Generative AI!

Quan Mai
Aug 23, 2019
  5745
(5 votes)

Enable Sticky View for Catalog content

No one likes slow UIs. That is also true with the Catalog UI. It can be sluggish at times, especially when you publish a product, it will switch to On Page Edit view, which is, in most of the cases, not fast enough. Sticky View was introduced to address that issue in CMS UI, however until now Sticky View for Catalog content is still disabled. When we wait for Commerce team to work on that, there is a workaround for the problem.

The default view you want to see, as well as the publish view (i.e. the view after a content is published) can be defined in an UIDescriptor, like this 

    [UIDescriptorRegistration]
    public class FashionProductUIDescriptor : UIDescriptor<FashionProduct>
    {
        public FashionProductUIDescriptor()
            : base(ContentTypeCssClassNames.Container)
        {
            DefaultView = CmsViewNames.AllPropertiesView;
            PublishView = CmsViewNames.AllPropertiesView;
        }
    }

With this UIDescriptor, whenever you open a content of type FashionProduct, the default view will be All Properties. And if you make changes and publish, it will stay in that mode. While it's not really Sticky View, it's quite close and it helps with the original issue.

The tricky part here is that, you would have to define an UIDescriptor for each and every of your strongly typed content type. You can't define an UIDescriptor on ProductContent or EntryContentBase as there are already framework UIDescriptor(s) for them, and having two UIDescriptors with same TypeIdentifier will break your site. While copy and paste is not a fun thing to do, it might be bearable.

Aug 23, 2019

Comments

Manoj Kumawat
Manoj Kumawat Aug 23, 2019 12:48 PM

Hey Quan, 

This is amazing. I have done something like this before but with a different approach.

Another way of sticking with the UI is to supply the PageHeader as a tab group. 

That should preview it on the top of the info panel - 

Ofcourse this is slightly lengthy because it must be on every property but definitely a workaround. 

Janaka Fernando
Janaka Fernando Aug 28, 2019 01:30 PM

Nice tip Quan Mai. 

If you have a Base Product class that all your Product types inherit from you could use this for your UIDescriptor.  

Please login to comment.
Latest blogs
A day in the life of an Optimizely Developer - Enabling Opti ID within your application

Hello and welcome to another instalment of A Day In The Life Of An Optimizely developer, in this blog post I will provide details on Optimizely's...

Graham Carr | May 9, 2024

How to add a custom property in Optimizely Graph

In the Optimizely CMS content can be synchronized to the Optimizely Graph service for it then to be exposed by the GraphQL API. In some cases, you...

Ynze | May 9, 2024 | Syndicated blog

New Security Improvement released for Optimizely CMS 11

A new security improvement has been released for Optimizely CMS 11. You should update now!

Tomas Hensrud Gulla | May 7, 2024 | Syndicated blog

Azure AI Language – Key Phrase Extraction in Optimizely CMS

In this article, I demonstrate how the key phrase extraction feature, offered by the Azure AI Language service, can be used to generate a list of k...

Anil Patel | May 7, 2024 | Syndicated blog