How can I add a delete button on contentTree items? | Community
Skip to main content
Jniza
New Participant
February 22, 2024
Solved

How can I add a delete button on contentTree items?

  • February 22, 2024
  • 2 replies
  • 667 views

Hi !

I want add a delete button here:


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

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 Imran__Khan

@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

2 replies

Imran__Khan
Imran__KhanAccepted solution
New Participant
February 22, 2024

@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

BrianKasingli
New Participant
February 22, 2024

There are several ways to achieve this

- Create custom clientlib to target the editor

- Overlay the ContentTree.js as you mentioned.