Skip to main content
Mar 19, 2024 11:02 AM UTC
Solved

style systems

im having teaser,button other components having style systems with different label groups in style sysytem , intiatly i want to hide some of the  groups in style sytem and im also having page polcie with style after selecting page llevel styling only i need to enable the hidden group label of components ?

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

4 replies

Mar 19, 2024 11:21 AM UTC

@arunpatidar 

(function (window, document, $) {

    $(document).ready(function () {
        alert();
        $('.editor-StyleSelector-selectList _coral-Menu').each(function () {

            var selectList = $(this);
            console.log(selectList);
            selectList.find('._coral-SelectList-group').each(function () {
                var group = $(this);

                // Extract label attribute value directly
                var labelValue = group.attr('label');
                if (labelValue && labelValue.startsWith('Core-')) {
                    group.hide();
                }
            });
        });
    });
})(window, document, window.jQuery);

in this way ?
Translate
arunpatidar
Community Advisor
Community Advisor
Mar 19, 2024 12:13 PM UTC

Yes, using javascript but not on ready state but on click on style icon.

Translate
Arun Patidar
kautuk_sahni
Level 9
Mar 20, 2024 2:49 PM UTC

@jagadeeshth Did you find the suggestion from user helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.

Translate
Kautuk Sahni