Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

Disabling delete option for component

Avatar

Level 2

Hello everyone!

So I've got several components nested inside of another component. I want to disable the option for the user to delete the components. I'm using the Touch UI. I believe there is a way to change the JCR for the editor but I'm lost. Any help is appreciated.

This shows what I want to remove:

delete.JPG

4 Replies

Avatar

Level 8

Have you tried putting a cq:editConfig in place and not providing the delete option?

Avatar

Level 2

Yes, this is my editconfig currently:

<?xml version="1.0" encoding="UTF-8"?>

<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"

    jcr:primaryType="cq:EditConfig"

    actions="\[text:My Component,-,edit]"/>

Avatar

Level 2

For future reference for anyone with the same problem, I changed my cq;editConfig to this and it removed the option to delete, only allowed for copying and moving.

<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"

    cq:actions="[text:My Component,-,copymove]"

    cq:dialogMode="floating"

    cq:layout="editbar"

    jcr:primaryType="cq:EditConfig">

</jcr:root>

Avatar

Level 2

In your cq:editConfig node add the following property:  cq:actions of type String[] then you can define what actions you want to allow, notice this sample value that allows edit, copy, move delete and insert: edit, -, copymove, delete, -, insert, -