Expand my Community achievements bar.

Context-Aware Configurations

Avatar

Level 3

Hi,

 

I am doing configuration for my project for the frontend pipeline and I have followed this article - https://www.oshyn.com/blog/context-aware-configurations-aem

 

Example: in the Config folder we have root folder called my-project, we have created US and INT Sling: Folder Inside that we have created node - sling:configs  > com.adobe.cq.wcm.core.components.config.HtmlPageItemsConfig -- In this we are creating some thems example we have created two different theme in each country US and INT.

 

Next I went to /content/jcr:content here the adding sling:configRef --> we are adding in /content/myproject/jcr:content. -->/config/my-project and /config/my-project/us-->  /config/my-project/sling:config/us and /config/my-project/int --> /config/my-project/sling:config/int mapping all config.

 

now when I open any page under us/en/homepage.html --> all the themes should be loaded in the page --> 4 theme 2 is from US and INT has 2

 

output: all clientlibs should be loaded on the page.

 

can anyone help me on this 

 

 

 

3 Replies

Avatar

Community Advisor

Can you explain a little more about what is the issue you are facing? Any screenshot would be helpful as well. You could also check this video which explains graphically how to use Context-Aware configs: https://www.youtube.com/watch?v=0rlpPOxLyW4&ab_channel=ManuelGutierrez

 

Hope this helps.



Esteban Bustamante

Avatar

Level 3

Hi @EstebanBustamante 

 

I am creating some folders under config and adding sling:configs inside int i have 3 files called CSS and JS and same way I have doing for US side then I am mapping in the content folder us will be targeted to US one and INT will be a target to INT under /content so here One on One mapping is working.

 

mapping in /content with sling:configRef property

 

I want to show all the int and US CSS JS file which is added in the config folder it should load on the any page if I open it int/home.html or us/home.html. 

 

I have used some properties like sling:configCollectionInherit sling:configPropertyInherit

 

naveen_27_05_0-1712035372181.png