Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

Freeze the specific components in authoring page

dragon2A
Level 6
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
smacdonald2008
Level 10
Level 10

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

smacdonald2008
Level 10
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>
Ashish_Ranjan
Level 2
Level 2

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

Tuhin_Ghosh
Level 7
Level 7

Hi,

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

Thanks

Tuhin

kautuk_sahni
Community Manager
Community Manager

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

dragon2A
Level 6
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

Tuhin_Ghosh
Level 7
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