Expand my Community achievements bar.

SOLVED

How to add delete option context menu??

Avatar

Level 9

Hi All,

I have component and if i right click on it i can see only 'Edit' and 'Annotate' options.I need to show 'Delete' Option as well.

How to achieve this??

Thanks,

Kishore

1 Accepted Solution

Avatar

Correct answer by
Level 10

By default 'Delete' is visible, but if you are not able to see the someone must have disabled it.

Take a look at how you can configure these options

https://docs.adobe.com/docs/en/cq/5-5/developing/components/edit_config.html#cq:actions

http://labs.6dglobal.com/blog/2014-01-08/the-great-and-powerful-cq-editconfig/

View solution in original post

3 Replies

Avatar

Correct answer by
Level 10

By default 'Delete' is visible, but if you are not able to see the someone must have disabled it.

Take a look at how you can configure these options

https://docs.adobe.com/docs/en/cq/5-5/developing/components/edit_config.html#cq:actions

http://labs.6dglobal.com/blog/2014-01-08/the-great-and-powerful-cq-editconfig/

Avatar

Administrator

Hi

As rightly mentioned by the Praveen,

Please go through the article, which may help you with adding delete option.

//cq:actions

The cq:actions property (String array) defines one or several actions that can be performed on the component. The following values are available:

 

                             
Property ValueDescription
text:<some text>Displays the static text value <some text>
-Adds a spacer
editAdds a button to edit the component
deleteAdds a button to delete the component
insertAdds a button to insert a new component before the current one
copymoveAdds a button to copy and cut the component

The following configuration adds an edit button, a spacer, a delete and an insert button to the component edit bar:

     
1
2
3
4
    cq:actions="[edit,-,delete,insert]"
    cq:layout="editbar"
    jcr:primaryType="cq:EditConfig"/>

Code samples are intended for illustration purposes only.

The following configuration adds the text "Inherited Configurations from Base Framework" to the component edit bar:

     
1
2
3
4
    cq:actions="[text:Inherited Configurations from Base Framework]"
    cq:layout="editbar"
    jcr:primaryType="cq:EditConfig"/>

 

Link:- http://labs.6dglobal.com/blog/2014-01-08/the-great-and-powerful-cq-editconfig/

//This is excellent article talking about cq:EditConfig.

 

I hope this will help you.

Thanks and Regards

Kautuk Sahni



Kautuk Sahni

Avatar

Level 5

FYI - since labs.6dglobal.com is down, here's a link to the same article on the cq:editconfig on my personal blog:

https://www.danklco.com/posts/2014/01/08/the-great-and-powerful-cq-editconfig/