I have created a custom datatype(key-value with multifield) for CFM editor . The data is getting stored as string array under the CF master node with the property name(specifications) . This is working fine .
Expectation :
Is there anyway we can store the multifield data as item0,item1 like in component node structure.
解決済! 解決策の投稿を見る。
表示
返信
いいね!の合計
@TirtharajSa2 ,For best interoperability and future-proofing, stick with the array-based property for multifields in cf model. If you have a strict requirement for node-based storage (item0, item1), consider if it is possible to adapt your consuming logic to support array properties, or otherwise invest in a post-processing workflow solution as a customization.
@TirtharajSa2 ,For best interoperability and future-proofing, stick with the array-based property for multifields in cf model. If you have a strict requirement for node-based storage (item0, item1), consider if it is possible to adapt your consuming logic to support array properties, or otherwise invest in a post-processing workflow solution as a customization.
Hi @TirtharajSa2 ,
In Content Fragment Models (CFM), when you create a multifield (like your key-value), the data is saved as a string array property (e.g. specifications = ["key1:value1", "key2:value2"]).
Unlike component dialogs, CFM does not create item0, item1 child nodes. This is by design because Content Fragments are meant to be lightweight and easy to expose through GraphQL and APIs.
If you still want the item0/item1 node structure:
You’d need to build a custom persistence handler for your custom data type (complex and not recommended).
Or run a workflow/event listener after save that copies the array values into child nodes.
Best practice: Stick with the array format. It’s the Adobe-recommended way, easier to query via GraphQL, and simpler to work with in Sling Models or code.
Thanks & Regards,
Visha;