Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

How to Create Composite Multifield in Content Fragment without Custom JS

Avatar

Level 4

Hi All,

 

I having a issue with content fragment composite multified, currently we having the composite multifield in a content fragment working with custom JS functionality, So this Multifield JS functionality is affecting the existing functionality in our project, Is it possible to create a composite multifield in content fragment like in the screenshot with out any Custom JS? If any one having any idea kindly let me know to solve this issue.

 

composite multifield.png

 

Thanks

Nandheswara

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @Nandheswara 

 

The recommended approach from Adobe is to have Nested CF, rather than composite multifield.

Thus, the functionality isn't available OOTB. You would have to own and fix the customizations  for composite multifields.

 

If you are early in the project, please consider going Adobe route. It will provide you better results in terms of GraphQL queries as well

 

Adobe recommended way:

  • Add a Content Reference Multifield in the first content fragment model.
  • Create a 2nd content fragment model and required fields.
  • Reference the content fragments of second type from the first type

 


Aanchal Sikka

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hello @Nandheswara 

 

The recommended approach from Adobe is to have Nested CF, rather than composite multifield.

Thus, the functionality isn't available OOTB. You would have to own and fix the customizations  for composite multifields.

 

If you are early in the project, please consider going Adobe route. It will provide you better results in terms of GraphQL queries as well

 

Adobe recommended way:

  • Add a Content Reference Multifield in the first content fragment model.
  • Create a 2nd content fragment model and required fields.
  • Reference the content fragments of second type from the first type

 


Aanchal Sikka

Avatar

Level 5

Like @aanchal-sikka mentioned, if its in early stage go with Nested CF approach, as it allows querying the properties via GraphQL and probably is the reason Adobe may not have directly provided the composite multifield, since it requires its own schema or definition, leading to creation of a new cf model in CF world. But if you dont want to go that route and do not care about querying, and prefer to manage everything in 1 place, you can choose the free form JSON field, as you mentioned no custom JS. But you will end up having limitations like validating JSON if it meets your composite multifield definition. If you are willing to go with custom JS, there are options open. Thanks