How to add delete option context menu?? | Community
Skip to main content
GK-007
Level 9
March 22, 2016
Solved

How to add delete option context menu??

  • March 22, 2016
  • 3 replies
  • 1794 views

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

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

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/

3 replies

edubey
edubeyAccepted solution
Level 10
March 22, 2016

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/

kautuk_sahni
Community Manager
Community Manager
March 23, 2016

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
dan_klco
Level 4
February 22, 2018

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/