Hi Team,
I was working on to design a data model for content fragment model and got stuck on for a field which needed one multifield like structure as:
one multifield with 3 different fields for social links.
I gone thru many articles and blog with custom implementation but somehow it did not worked for me.I did try reference as well but it is again not suitable.
can anyone suggest any alternative to achieve the same.
Thanks you
Umesh Thakur
Solved! Go to Solution.
Views
Replies
Total Likes
There is a long discussion and here https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/multifield-in-content-frag...
Please check this link. And its not possible unless you develop something like it
There is a long discussion and here https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/multifield-in-content-frag...
Please check this link. And its not possible unless you develop something like it
Hi @Umesh_Thakur
As @kaikubad Stated , you can have a look at the existing discussion on the blog post.
How we did in our project is that we used the JSON Field Approach.
We used a JSON field to simulate a multifield structure.
Let me know if your use case can be solved by this.
Make 2 Content Fragment Models.
1st containing all the fields you want to repeat,
2nd containing a content fragment variation path
Now while making the content fragments, author by using the 1st one how many times you want.
Then create a CF with the second one and add all the 1st ones into it.
Now retrieve the data on a single hit, in your code through graphQL API.
create two Content Fragment Models: one for the social link and another for the container. The social link model would contain the individual fields for the social link (e.g., link type and URL), and the container model would contain a content fragment variation path that references the social link model.
<!-- Social Link Model -->
type SocialLinkModel {
linkType: String
linkUrl: String
}
<!-- Container Model -->
type ContainerModel {
socialLinks: [SocialLinkModel]
}
In this example, the ContainerModel contains a field called socialLinks that references an array of SocialLinkModel instances.
Views
Likes
Replies