Don't understand cssClassNames in aem-core-wcm-components 2.0.0 | Community
Skip to main content
Level 2
April 13, 2018
Solved

Don't understand cssClassNames in aem-core-wcm-components 2.0.0

  • April 13, 2018
  • 4 replies
  • 4079 views
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 Daniel_Gordon

Ultimately the method getCssClassNames() of ComponentContext is called: aem-core-wcm-components/PageImpl.java at master · Adobe-Marketing-Cloud/aem-core-wcm-components · GitHub .

This is an internal api, but has some logic built in to inspect the component and add classes based on the name of the component and any any responsive grid integration. This method also integrates the Style System in AEM 6.3 /6.4: Style System . You can use the style system at the Page level by editing an Editable Template > Template Properties > Page Design.

<!-- result below -->

<body class="page basicpage home-page">

4 replies

Daniel_Gordon
Adobe Employee
Daniel_GordonAdobe EmployeeAccepted solution
Adobe Employee
April 13, 2018

Ultimately the method getCssClassNames() of ComponentContext is called: aem-core-wcm-components/PageImpl.java at master · Adobe-Marketing-Cloud/aem-core-wcm-components · GitHub .

This is an internal api, but has some logic built in to inspect the component and add classes based on the name of the component and any any responsive grid integration. This method also integrates the Style System in AEM 6.3 /6.4: Style System . You can use the style system at the Page level by editing an Editable Template > Template Properties > Page Design.

<!-- result below -->

<body class="page basicpage home-page">

smacdonald2008
Level 10
April 13, 2018

Great response Daniel - we marked that as corrrect!

Level 2
April 14, 2018

The response is helpful for me.

Thank Daniel and Scott Macdonald!

azaquan
Level 2
October 18, 2019

Hi Daniel,

I'm trying to do the same you explain on AEM 6.5 but I don't see the "Page Design". Any advice on how to accomplish the same?

Thank you,

Juan