Multifield - Auto generate nodes under content | Community
Skip to main content
Level 3
July 16, 2016

Multifield - Auto generate nodes under content

  • July 16, 2016
  • 4 replies
  • 2347 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

4 replies

Level 4
July 16, 2016

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

kautuk_sahni
Community Manager
Community Manager
July 18, 2016

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
smacdonald2008
Level 10
July 18, 2016

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. 

Level 3
July 18, 2016

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