Expand my Community achievements bar.

SOLVED

style systems

Avatar

Level 1

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 ?

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor
4 Replies

Avatar

Correct answer by
Community Advisor

Avatar

Level 1

@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 ?

Avatar

Community Advisor

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



Arun Patidar

Avatar

Administrator

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



Kautuk Sahni