내 커뮤니티 업적 표시줄을 확대합니다.

해결됨

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 채택된 해결책 개

Avatar

정확한 답변 작성자:
Community Advisor
4 답변 개

Avatar

정확한 답변 작성자:
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

AEM LinksLinkedIn

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