Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events
SOLVED

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

Avatar

Level 2
1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

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

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.

2018-04-13 at 3.52 PM.png

2018-04-13 at 3.53 PM.png

2018-04-13 at 3.55 PM.png

<!-- result below -->

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

View solution in original post

4 Replies

Avatar

Correct answer by
Employee Advisor

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

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.

2018-04-13 at 3.52 PM.png

2018-04-13 at 3.53 PM.png

2018-04-13 at 3.55 PM.png

<!-- result below -->

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

Avatar

Level 10

Great response Daniel - we marked that as corrrect!

Avatar

Level 2

The response is helpful for me.

Thank Daniel and Scott Macdonald!

Avatar

Level 2

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

template.png