Don't understand cssClassNames in aem-core-wcm-components 2.0.0 | Community
Skip to main content
Level 2
Apr 13, 2018 4:59 PM UTC
Solved

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Daniel_Gordon
Daniel_GordonAccepted solution
Employee
Apr 13, 2018 7:56 PM UTC

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

azaquan
Level 2
Oct 18, 2019 9:49 PM UTC

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

Translate
Level 2
Apr 14, 2018 4:30 AM UTC

The response is helpful for me.

Thank Daniel and Scott Macdonald!

Translate
smacdonald2008
Level 10
Apr 13, 2018 8:07 PM UTC

Great response Daniel - we marked that as corrrect!

Translate
Daniel_Gordon
Daniel_GordonAccepted solution
Employee
Apr 13, 2018 7:56 PM UTC

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">

Translate