Expand my Community achievements bar.

Multifield in content fragment

Avatar

Level 2

Hello,

 

I am using aem 6.5

My requirement is to add multifield in content fragment.

Eg. { 

   Title: kiran,

   desc: test desc,

   Products: [

{

       name: abcd

       Url: google.com

      Location: USA

}]

}

So for this product I need multifield which I can drag drop from content fragment.

I tried link which was provided in other qu i.e. http://experience-aem.blogspot.com/2018/10/aem-6420-assets-content-fragments-coral-3-composite-multi...

But this is more of static where fields are already provided in code. I m looking for fields ie. Name, url, location can also be shared by me.

 Anything like this is possible or any suitable solution which can hp me to bring this json in content fragment.

 

Pls help.

 

 

 

 

 

 

 

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

8 Replies

Avatar

Community Advisor

Hi @Kiranchonkar  Multifield is not a thing for CF because Content Fragment is what you see on publish side whereas multifield is generally used by authors to input data, there is another thread for similar discussion you can refer

 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/multifield-in-content-frag...

 

Avatar

Level 2

The link which you shared, I already refered it and it is not working with aem 6.5

 

Avatar

Level 2

The link which you shared, I already refered it and it is not working with aem 6.5

 

 

Avatar

Community Advisor
  • Create a component with multifield first according to the requirement.
  • Then include that multifield in content fragment model dialog using sling:resourcetype (granite/ui/components/foundation/include).
  • And in path property give the path of multifield created in above component. This will include that multifield in your content fragment model.

Avatar

Level 2

Can you provide ss for better understanding.

Also in this case key value will b fixed then, I am looking for dynamic key values so that this service can be used for any combination.

 

Avatar

Community Advisor

Including in CFM dialog

 

Varun_Shakya_0-1620747981652.png

 

COmponent with multifield

Varun_Shakya_1-1620748233216.png

 

Avatar

Level 2

Hi Varun I tried it and multifield appears in my CF as well

But whatever value I am adding to my multifield is not getting stored.

Multifield has 3 fields in it

After filling values in 3 fields, it just stores value of first only.