Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

SOLVED

className property for components

Avatar

Level 6

I saw a property called className in geometric outdoors component. What is its significance ?

1 Accepted Solution

Avatar

Correct answer by
Level 10

This is what you are referring to - its a property that belongs to a node of type wcm/mobile/components/page.

[img]className.png[/img]

This is referencing CSS class. Its used in the JSP logic as well:

 String className = component.getProperties().get("className", "");

 pageContext.setAttribute("className", StringEscapeUtils.escapeHtml4(className));

Then used in the <body > tag for style. 

View solution in original post

4 Replies

Avatar

Level 10

What component are you referring to? 

Avatar

Level 10

This is basically a property used to apply CSS style dynamically !!

Avatar

Level 6

There is a "page" and "page_mobile "component. That is the main template. 

For page component the className is "page"

For page_mobile component the className is "page-mobile"

Is it used for CSS ?

Avatar

Correct answer by
Level 10

This is what you are referring to - its a property that belongs to a node of type wcm/mobile/components/page.

[img]className.png[/img]

This is referencing CSS class. Its used in the JSP logic as well:

 String className = component.getProperties().get("className", "");

 pageContext.setAttribute("className", StringEscapeUtils.escapeHtml4(className));

Then used in the <body > tag for style.