Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

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

Community Advisor

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