Disabling delete option for component | Community
Skip to main content
BlakeConnally
Level 2
Jun 13, 2017 5:03 PM UTC

Disabling delete option for component

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:

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

4 replies

rodolfoe6195251
Level 2
Jun 13, 2017 5:26 PM UTC

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, -

Translate
BlakeConnally
Level 2
Jun 13, 2017 5:21 PM UTC

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>

Translate
Level 8
Jun 13, 2017 5:09 PM UTC

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

Translate
BlakeConnally
Level 2
Jun 13, 2017 5:14 PM UTC

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]"/>

Translate