Expand my Community achievements bar.

SOLVED

How can I add a delete button on contentTree items?

Avatar

Level 2

Hi !

I want add a delete button here:

Jniza_0-1708588171289.png


Should I modify the '_addToTree' method of ui.ContentTree.js ???

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 10

@Jniza Overlay below file to add delete button

/libs/cq/gui/components/authoring/editors/clientlibs/core/js/ui/ui.ContentTree.js

 

As it is a custom change project specific change we have been looking for. Please change below lines and try:

line number 178 to add delete button

Change line number 322 to add delete event

View solution in original post

2 Replies

Avatar

Community Advisor

There are several ways to achieve this

- Create custom clientlib to target the editor

- Overlay the ContentTree.js as you mentioned.

Avatar

Correct answer by
Level 10

@Jniza Overlay below file to add delete button

/libs/cq/gui/components/authoring/editors/clientlibs/core/js/ui/ui.ContentTree.js

 

As it is a custom change project specific change we have been looking for. Please change below lines and try:

line number 178 to add delete button

Change line number 322 to add delete event