Multifield in content fragment

Avatar

Avatar
Boost 5
Level 2
Kiranchonkar
Level 2

Likes

5 likes

Total Posts

13 posts

Correct reply

0 solutions
Top badges earned
Boost 5
Boost 3
Give Back 3
Give Back
Boost 1
View profile

Avatar
Boost 5
Level 2
Kiranchonkar
Level 2

Likes

5 likes

Total Posts

13 posts

Correct reply

0 solutions
Top badges earned
Boost 5
Boost 3
Give Back 3
Give Back
Boost 1
View profile
Kiranchonkar
Level 2

11-05-2021

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.

 

 

 

 

 

 

 

 

Replies

Avatar

Avatar
Boost 5
Level 7
Ritesh_M
Level 7

Likes

179 likes

Total Posts

142 posts

Correct reply

44 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Applaud 5
Affirm 1
View profile

Avatar
Boost 5
Level 7
Ritesh_M
Level 7

Likes

179 likes

Total Posts

142 posts

Correct reply

44 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Applaud 5
Affirm 1
View profile
Ritesh_M
Level 7

11-05-2021

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

Avatar
Boost 5
Level 2
Kiranchonkar
Level 2

Likes

5 likes

Total Posts

13 posts

Correct reply

0 solutions
Top badges earned
Boost 5
Boost 3
Give Back 3
Give Back
Boost 1
View profile

Avatar
Boost 5
Level 2
Kiranchonkar
Level 2

Likes

5 likes

Total Posts

13 posts

Correct reply

0 solutions
Top badges earned
Boost 5
Boost 3
Give Back 3
Give Back
Boost 1
View profile
Kiranchonkar
Level 2

11-05-2021

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

 

Avatar

Avatar
Boost 5
Level 2
Kiranchonkar
Level 2

Likes

5 likes

Total Posts

13 posts

Correct reply

0 solutions
Top badges earned
Boost 5
Boost 3
Give Back 3
Give Back
Boost 1
View profile

Avatar
Boost 5
Level 2
Kiranchonkar
Level 2

Likes

5 likes

Total Posts

13 posts

Correct reply

0 solutions
Top badges earned
Boost 5
Boost 3
Give Back 3
Give Back
Boost 1
View profile
Kiranchonkar
Level 2

11-05-2021

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

 

 

Avatar

Avatar
Give Back 10
MVP
Varun_Shakya
MVP

Likes

124 likes

Total Posts

97 posts

Correct reply

24 solutions
Top badges earned
Give Back 10
Ignite 3
Ignite 1
Give Back 5
Give Back 3
View profile

Avatar
Give Back 10
MVP
Varun_Shakya
MVP

Likes

124 likes

Total Posts

97 posts

Correct reply

24 solutions
Top badges earned
Give Back 10
Ignite 3
Ignite 1
Give Back 5
Give Back 3
View profile
Varun_Shakya
MVP

11-05-2021

  • 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

Avatar
Boost 5
Level 2
Kiranchonkar
Level 2

Likes

5 likes

Total Posts

13 posts

Correct reply

0 solutions
Top badges earned
Boost 5
Boost 3
Give Back 3
Give Back
Boost 1
View profile

Avatar
Boost 5
Level 2
Kiranchonkar
Level 2

Likes

5 likes

Total Posts

13 posts

Correct reply

0 solutions
Top badges earned
Boost 5
Boost 3
Give Back 3
Give Back
Boost 1
View profile
Kiranchonkar
Level 2

11-05-2021

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

Avatar
Give Back 10
MVP
Varun_Shakya
MVP

Likes

124 likes

Total Posts

97 posts

Correct reply

24 solutions
Top badges earned
Give Back 10
Ignite 3
Ignite 1
Give Back 5
Give Back 3
View profile

Avatar
Give Back 10
MVP
Varun_Shakya
MVP

Likes

124 likes

Total Posts

97 posts

Correct reply

24 solutions
Top badges earned
Give Back 10
Ignite 3
Ignite 1
Give Back 5
Give Back 3
View profile
Varun_Shakya
MVP

11-05-2021

Including in CFM dialog

 

Varun_Shakya_0-1620747981652.png

 

COmponent with multifield

Varun_Shakya_1-1620748233216.png

 

Avatar

Avatar
Boost 5
Level 2
Kiranchonkar
Level 2

Likes

5 likes

Total Posts

13 posts

Correct reply

0 solutions
Top badges earned
Boost 5
Boost 3
Give Back 3
Give Back
Boost 1
View profile

Avatar
Boost 5
Level 2
Kiranchonkar
Level 2

Likes

5 likes

Total Posts

13 posts

Correct reply

0 solutions
Top badges earned
Boost 5
Boost 3
Give Back 3
Give Back
Boost 1
View profile
Kiranchonkar
Level 2

11-05-2021

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.