Want to access component's style system value in multiple paces of component's html | Community
Skip to main content
bpeddapudi
Level 2
September 18, 2020
Solved

Want to access component's style system value in multiple paces of component's html

  • September 18, 2020
  • 1 reply
  • 996 views

Hi I have a use case where I want to use content author's choices made using style systems (it has multi-selection option for different areas) in different parts of html. Not sure how to do it.

 

Out Style System dropdown example:

 
 
Where I want to use it in html:
 
I want to able to get the values and use it in html something like this, ignore the syntax 🙂 just want to express how I want to access it.

 

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 arunpatidar

With OOTB style system you can't do that. and I don't see any need here as well, if you have classes on parent DOM element then you can apply style to particular child element as well using parent selector.

But if you want you have to get those values in inside your model and apply to child element using htl

https://helpx.adobe.com/experience-manager/6-4/sites/developing/using/reference-materials/javadoc/com/day/cq/wcm/api/designer/Style.html

 

1 reply

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
September 20, 2020

With OOTB style system you can't do that. and I don't see any need here as well, if you have classes on parent DOM element then you can apply style to particular child element as well using parent selector.

But if you want you have to get those values in inside your model and apply to child element using htl

https://helpx.adobe.com/experience-manager/6-4/sites/developing/using/reference-materials/javadoc/com/day/cq/wcm/api/designer/Style.html

 

Arun Patidar