How to create cq:template nodes programatically | Community
Skip to main content
December 9, 2021
Solved

How to create cq:template nodes programatically

  • December 9, 2021
  • 1 reply
  • 866 views

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.
Best answer by arunpatidar

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.

1 reply

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
December 11, 2021

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
Pavan_Kalyan-1
December 13, 2021

yes this should work.