Expand my Community achievements bar.

Multifield - Auto generate nodes under content

Avatar

Level 3

Hi,

I am new to AEM and working on a multi field component development. when we click on 'Add Item', it opens a form with configured filed where we fill and save them. These values will be stored under Content as a node [Each multi-field stored as a separate node]. I would like to understand the logic behind the nodes generation. Currently the nodes under Content will be showing as 1, 2,3 etc. Is there a way where we can control the node generation as node1, node2, node3 etc. ? Please help

Appreciate your quick support!

Thanks,

Kishore

4 Replies

Avatar

Level 4

That is they way that nodes work with multi-field. What is your issue with this functionality? 

Avatar

Administrator

Hi Kishore,

Yes, we can definitely control it to certain extent.

Please have a look at this Helpx Article, it covers "Creating your first Adobe Experience Manager custom xtype"

Link:- https://helpx.adobe.com/experience-manager/using/creating-custom-xtype.html

// The "CustomWidget.js" is the script which is creating the node in JCR, we can configure as per our need.

It is not necessary that the node would be created as shown by you in the image attached, in the link provided by me you would see the value would be stored in a string array.

 

and yes, Steve also mentioned it correctly, node works with multi-field this way only. Are you trying to achieve something which is causing hindrance this this method ?

I hope this would be of some help to you.

Thanks and Regards

Kautuk Sahni



Kautuk Sahni

Avatar

Level 10

The name of the node where a multifield stores data is not a configurable value. Only the component uses these values and its not visible to the end user. Its props are where the values that the multifield uses are stored. 

Avatar

Level 3

Hi Kautak,

Thanks for your response.

I have gone through the link that you have provided but I observe the multi filed data is storing as a string array as you mentioned. Unfortunately this doesn't work for me. Because the (content) data that we generate will be consumed by some other front-end application. They are looking the data to be like slide1, slide2 etc. and the business want the same.

Is my requirement doable?

Thanks,

Kishore