How to dynamically populate the variation field in Experience Fragment Component? | Community
Skip to main content
sanjanas3080058
Level 2
Mar 17, 2020 10:38 AM UTC
Solved

How to dynamically populate the variation field in Experience Fragment Component?

Hi All,

 

Is there any way to dynamically display one Experience Fragment component from /content/experience-fragments based on the results we get by running a query?

Example: The query result gives fragment path :/content/experience-fragments/test-xf 

In the below screenshot , instead of choosing an XF from picker, the path should be pre-populated with the above fragment path (/content/experience-fragments/test-xf) .

 

 

So here I need help to dynamically populate value in "Variation" Field in an Experience Fragment based on my query result. 

Can we overlay the OOTB js functionality?  or what is the best approach of achieving this?

 

@kautuk_sahni  @arunpatidar @4490632 @veenavikraman 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
arunpatidar
arunpatidarAccepted solution
New Participant
Mar 18, 2020 5:00 PM UTC

I created similar functionality just POC for the content fragment, you can try a similar approach

https://aemlab.blogspot.com/2018/09/aem-content-fragment-with-component.html

 

you need to clear the variation filed in XF and populate using javascript

 

Arun Patidar

2 replies

arunpatidar
arunpatidarAccepted solution
New Participant
Mar 18, 2020 5:00 PM UTC

I created similar functionality just POC for the content fragment, you can try a similar approach

https://aemlab.blogspot.com/2018/09/aem-content-fragment-with-component.html

 

you need to clear the variation filed in XF and populate using javascript

 

Translate
Arun Patidar
tushaar_srivastava
Level 6
Apr 14, 2020 9:49 AM UTC
Thank you
Translate