Hello community,
I am trying to implement a key-value pair field to content fragment model.
For example, as shown in the screenshot below, users should be able to add as many key-value pairs as they want, but instead of being one field below Fragment Reference section, there should be two fields: one for Key and another for Value. I didn't see anything like such in the already available options. Could you help me with a way to implement this or point me to existing way to add this?
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
You can follow this blog - https://jimfrenette.com/aem/content-fragments/composite-multifield/- to create a composite multifield like an AEM dialog multifield and add it directly inside the content fragment model via CRX.
Hi @keno6396
A similar discussion is on this as well
https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/multifield-or-multfield-li...
You can checkout my comment on above post.
As well as the accepted solution if that helps.
You can follow this blog - https://jimfrenette.com/aem/content-fragments/composite-multifield/- to create a composite multifield like an AEM dialog multifield and add it directly inside the content fragment model via CRX.
Thank you. I followed the instructions on that link to achieve what I wanted: composite multifield. Is there way to make that as data type in CFM instead of customizing existing model?
I have created a separate cfm to have these key value pairs as data types and use that as a multivalued fragment reference in the main model. Basically you will have a seperate model for key value pairs and refer that in main cfm via fragment reference. In this way you will have a proper schema incase you are exposing this via GraphQL
Views
Replies
Total Likes
@keno6396 Did you find the suggestions from users helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!
Views
Replies
Total Likes
Views
Likes
Replies