Cannot remove component with responsivegrid from editable template | Community
Skip to main content
srinir44531418
Level 2
March 27, 2019

Cannot remove component with responsivegrid from editable template

  • March 27, 2019
  • 1 reply
  • 3628 views

We have a component with a coded in responsive grid (code below). When we add this component to the editable template, template author could not delete any more.

Search on forums turned up something that vaguely referenced Synthetic Resource and need to create content using cq:template.

Appreciate if anyone can explain WHY this type of component, once added to the template, cannot be deleted. And any workaround without having to ask template authors to add content (to satisfy responsive grid) before being able to delete the component from template (structure).

<div data-sly-resource="${'content' @ resourceType='wcm/foundation/components/responsivegrid'}"></div>
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

smacdonald2008
Level 10
March 27, 2019

Typically components added to an editable template cannot be deleted by an author. Do not put in components into a responsive grid at the editable template level. Should be placed in the page level to let authors add/delete a component.

srinir44531418
Level 2
March 27, 2019

Perhaps I have to elaborate on the issue. Here is how to reproduce:

1. Lets say we have two components - Component A and Component B.

2. Component A has simple HTL, say

<h1>This is Component A</h1>

3. Component B has following HTL

<h1>This is Component B</h1>

<div data-sly-resource="${'content' @ resourceType='wcm/foundation/components/responsivegrid'}"></div>

4. As "Template Author", edit a blank template and add Component A and Component B to the template in "Structure" mode.

5. As "Template Author", try to delete Component A and Component B from the Template.

Result:

1. As Template Author, you will see "Delete" option for Component A but NOT for Component B.

All of this usecase is on Template itself, not on a page and not as regular page author /editor.

Here is the thread I found on the same topic. adobe - Not able to remove components in Editable Template AEM - Stack Overflow

Hope this clarifies the issue.

arunpatidar
Community Advisor
Community Advisor
March 27, 2019

Hi,

As suggested; for quick fix, you can

  • Add content to the responsive grid in the component you are trying to delete.
  • Refresh the page
  • Delete the structure component
Arun Patidar