Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Freeze the specific components in authoring page

Avatar

Level 6

The requirement is to freeze the specific components / disable the WCMMODE in a page lever or in template level.

 

Any idea how to achieve that one.

7 Replies

Avatar

Level 10

Idea here being  you do not want authors to be able to remove components from a given page? 

Avatar

Level 10

AEM does not really support a freeze component feature. The best way to proceed here is to use cq:include to include components into a page:

https://docs.adobe.com/docs/en/cq/5-6-1/developing/components.html#<cq:include>

<%@taglib prefix="cq" uri="http://www.day.com/taglibs/cq/1.0" %><%
%><div class="center">
    <cq:include path="trail" resourceType="foundation/components/breadcrumb" />
    <cq:include path="title" resourceType="foundation/components/title" />
    <cq:include script="redirect.jsp"/>
    <cq:include path="par" resourceType="foundation/components/parsys" />
</div>

Avatar

Former Community Member

Hi ,

If you want to disable the WCMMode for a particular component then most probably you can use <sly data-sly-resource="${ 'text' @ resourceType='wcm/foundation/components/text', wcmmode='disabled'}" ></sly> to disable the component when you are including it at the page level.

Thanks
Ashish Ranjan

Avatar

Level 7

Hi,

Could you be more specific about what do you mean by freeze?

Thanks

Tuhin

Avatar

Administrator

Hi 

So you are in need to disable the wcmmode for a specific component? That can now be done via the wcmmode-option when including a component.

<footer data-sly-resource="${ @ path='footer', resourceType='myproject/footer', wcmmode='disabled'}"></footer>

Article :- http://blogs.adobe.com/experiencedelivers/experience-management/sightly-intro-part-1/ (Look at sample8.html)

I hope this will help you.

Thanks and Regards

Kautuk Sahni



Kautuk Sahni

Avatar

Level 6

Hi Lets suppose I have 10 components in page first 3 components I don't want those components edit by authors. I want to lock first 3 components in that page. 

 

we are using the Cq5.6.1 and we are not using the sightly.

 

Thanks

Uma

Avatar

Level 7

In this case you can make this components design level components as in these 3 components could only be edited in the design mode and the remove the access of the design mode for content authors. In that case the user having access to design would only be able to edit the components.

But a drawback is if these components are used elsewhere then also the components would not be editable by the content authors.


Thanks

Tuhin