Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Quan Mai
Aug 23, 2019
  5727
(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
Solving the mystery of high memory usage

Sometimes, my work is easy, the problem could be resolved with one look (when I’m lucky enough to look at where it needs to be looked, just like th...

Quan Mai | Apr 22, 2024 | Syndicated blog

Search & Navigation reporting improvements

From version 16.1.0 there are some updates on the statistics pages: Add pagination to search phrase list Allows choosing a custom date range to get...

Phong | Apr 22, 2024

Optimizely and the never-ending story of the missing globe!

I've worked with Optimizely CMS for 14 years, and there are two things I'm obsessed with: Link validation and the globe that keeps disappearing on...

Tomas Hensrud Gulla | Apr 18, 2024 | Syndicated blog

Visitor Groups Usage Report For Optimizely CMS 12

This add-on offers detailed information on how visitor groups are used and how effective they are within Optimizely CMS. Editors can monitor and...

Adnan Zameer | Apr 18, 2024 | Syndicated blog