Expand my Community achievements bar.

SOLVED

How to remove class "section" from the wrapper element of a component?

Avatar

Level 2

Hello,

to customize the wrapper element of a component (the one which AEM automatically adds) I'm adding the node "cq:htmlTag", with the following properties:

  • cq:tagName = div
  • class = thumbnail

With this setting, in the html output of the component I see

<div class="thumbnail section"> .... </div>

 

How can I say to AEM to not write the class "section"?

Thanks!

1 Accepted Solution

Avatar

Correct answer by
Level 10

alessandroniciforo wrote...

My usecase is that the design of the templates is being done independently, at the time being. So I'd like to avoid any possible conflict.

Anyway, I would expect that any additional class used internally by the software, not customizable, use a namespace to avoid conflicts with an already existing css (especially with a common name such as "section"). It's awful that it uses "section" instead of "cq-section" or "aem-section".

 


File a daycare request

View solution in original post

4 Replies

Avatar

Level 10

what is your usecase?    Section is used internally for run mode to provide various functionality & I would advise not to remove.  Instead create different css rules.

Avatar

Level 10

You can create a div with class 'thumbnail' under 'section' div and customize your css accordingly.

Avatar

Level 2

My usecase is that the design of the templates is being done independently, at the time being. So I'd like to avoid any possible conflict.

Anyway, I would expect that any additional class used internally by the software, not customizable, use a namespace to avoid conflicts with an already existing css (especially with a common name such as "section"). It's awful that it uses "section" instead of "cq-section" or "aem-section".

Avatar

Correct answer by
Level 10

alessandroniciforo wrote...

My usecase is that the design of the templates is being done independently, at the time being. So I'd like to avoid any possible conflict.

Anyway, I would expect that any additional class used internally by the software, not customizable, use a namespace to avoid conflicts with an already existing css (especially with a common name such as "section"). It's awful that it uses "section" instead of "cq-section" or "aem-section".

 


File a daycare request