How to create cq:template nodes programatically | Community
Skip to main content
Level 3
Dec 9, 2021 8:45 PM UTC
Solved

How to create cq:template nodes programatically

I have a child component as a multi-field of my parent component, I know I can initialize child component using cq:template but since I dont know how many child components ill add from dialog box, I cant initialize fix number of child components in parents cq:template.

 

 

Any ideas will be helpful. 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
arunpatidar
arunpatidarAccepted solution
New Participant
Dec 11, 2021 4:15 PM UTC

Hi,

Only Event Lister can help here.

On dialog save i.e. modification/creation, you can add new nodes with default value from cq:template to the content tree.

Arun Patidar

2 replies

arunpatidar
arunpatidarAccepted solution
New Participant
Dec 11, 2021 4:15 PM UTC

Hi,

Only Event Lister can help here.

On dialog save i.e. modification/creation, you can add new nodes with default value from cq:template to the content tree.

Translate
Arun Patidar
Pavan_Kalyan-1
Level 3
Dec 13, 2021 12:12 PM UTC

yes this should work.

Translate