Multifield within page create dialog | Community
Skip to main content
dreres
Level 2
January 29, 2020
Question

Multifield within page create dialog

  • January 29, 2020
  • 2 replies
  • 691 views

Hello,

I'm using a multifield within the page create dialog. But when creating a page, the multifield isn't rendered. It's only rendered when editing the page properties after creation.

This pretty simple code I added to the dialog items:

 

<test
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/multifield"
fieldLabel="My Multifield"
composite="{Boolean}true">
<title
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldLabel="My Multifield Item"
required="{Boolean}true"
name="./multifieldItem"/>
</test>

 

My page has the resource supertype:

core/wcm/components/page/v2/page

I also copied the node to the core page dialog to prevent, that any JS or other code of my page obstruct the rendering of the multifield. But there it isn't rendered, too. The render.jsp of the multifield has never been called. There are no errors in the JS console.

 

And also when I use wcm/foundation/components/page as resource supertype, it doesn't have an effect.

 

My system properties: Adobe Experience Manager 6.5.2.0

 

Thanks for helping me!

Andrea

2 replies

kaikubad
Community Advisor
Community Advisor
November 23, 2024

You need to add another property cq:showOnCreate="{Boolean}true" like this

 

<redirectType
jcr:primaryType="nt:unstructured"
cq:showOnCreate="{Boolean}true"
sling:resourceType="granite/ui/components/coral/foundation/form/select"
fieldLabel="Redirect Type"
name="./redirectType">
<items jcr:primaryType="nt:unstructured">
<default
jcr:primaryType="nt:unstructured"
text="302 (Default)"
value="302"/>
<_x0033_01
jcr:primaryType="nt:unstructured"
text="301"
value="301"/>
</items>
</redirectType>
kautuk_sahni
Community Manager
Community Manager
April 1, 2025

@dreres Did you find the suggestion helpful? Please let us know if you need more information. If a response worked, kindly mark it as correct for posterity; alternatively, if you found a solution yourself, we’d appreciate it if you could share it with the community. Thank you!

Kautuk Sahni