Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Multifield in content fragment

Kiranchonkar
Level 2
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.

7 Replies
Ritesh_Mittal
Community Advisor
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...

 

Kiranchonkar
Level 2
Level 2

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

 

Kiranchonkar
Level 2
Level 2

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

 

 

Varun_Shakya
Community Advisor
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.
Kiranchonkar
Level 2
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.

 

Kiranchonkar
Level 2
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.