Expand my Community achievements bar.

Applications for the 2024-2025 Adobe Experience Manager Champion Program are open!
SOLVED

Add multifield at page properties

Avatar

Level 5

Hi,

My requirement is so add a multifield dialog at page properties level. For that, I added multifield dialog at page component.

Now I can see the dialog when I open page properties level. 

The problem is that the values authored are not visible at root page jcr:content node. How can I fetch the authored values?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @goyalkritika ,

Maybe you made a mistake in XML. I tried to generate the same but it's perfectly working. I doubt in your multifield property you missed ,

composite="{Boolean}true"

Sady_Rifat_0-1698901563073.png

Still I am sharing the full XML with you, Hope you find your mistake,

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:granite="http://www.adobe.com/jcr/granite/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
    jcr:primaryType="nt:unstructured"
    jcr:title="Page"
    sling:resourceType="cq/gui/components/authoring/dialog"
    extraClientlibs="[cq.common.wcm,core.wcm.components.page.v3.editor,cq.wcm.msm.properties,granite.contexthub.configuration,cq.siteadmin.admin.properties,core.wcm.components.image.v3.editor]"
    helpPath="https://www.adobe.com/go/aem_cmp_page_v3"
    mode="edit"
    trackingFeature="core-components:page:v3">
    <content
        granite:class="cq-dialog-content-page"
        jcr:primaryType="nt:unstructured"
        sling:resourceType="granite/ui/components/coral/foundation/container">
        <items jcr:primaryType="nt:unstructured">
            <tabs
                granite:class="cq-siteadmin-admin-properties-tabs"
                jcr:primaryType="nt:unstructured"
                sling:resourceType="granite/ui/components/coral/foundation/tabs"
                size="L">
                <items jcr:primaryType="nt:unstructured">
                    <test
                        jcr:primaryType="nt:unstructured"
                        jcr:title="Test"
                        sling:resourceType="granite/ui/components/coral/foundation/fixedcolumns">
                        <items jcr:primaryType="nt:unstructured">
                            <column
                                    jcr:primaryType="nt:unstructured"
                                    sling:resourceType="granite/ui/components/coral/foundation/container">
                                <items jcr:primaryType="nt:unstructured">
                                    <itemMultifield
                                            jcr:primaryType="nt:unstructured"
                                            sling:resourceType="granite/ui/components/coral/foundation/form/multifield"
                                            fieldLabel="Add Item"
                                            composite="{Boolean}true">
                                        <field
                                                jcr:primaryType="nt:unstructured"
                                                sling:resourceType="granite/ui/components/coral/foundation/container"
                                                name="./textList">
                                            <items jcr:primaryType="nt:unstructured">
                                                <text
                                                    jcr:primaryType="nt:unstructured"
                                                    sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
                                                    fieldDescription="Text"
                                                    fieldLabel="Text"
                                                    name="./text"/>
                                            </items>
                                        </field>
                                    </itemMultifield>

                                </items>
                            </column>
                        </items>
                    </test>
                </items>
            </tabs>
        </items>
    </content>
</jcr:root>

 

 

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @goyalkritika ,

Maybe you made a mistake in XML. I tried to generate the same but it's perfectly working. I doubt in your multifield property you missed ,

composite="{Boolean}true"

Sady_Rifat_0-1698901563073.png

Still I am sharing the full XML with you, Hope you find your mistake,

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:granite="http://www.adobe.com/jcr/granite/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
    jcr:primaryType="nt:unstructured"
    jcr:title="Page"
    sling:resourceType="cq/gui/components/authoring/dialog"
    extraClientlibs="[cq.common.wcm,core.wcm.components.page.v3.editor,cq.wcm.msm.properties,granite.contexthub.configuration,cq.siteadmin.admin.properties,core.wcm.components.image.v3.editor]"
    helpPath="https://www.adobe.com/go/aem_cmp_page_v3"
    mode="edit"
    trackingFeature="core-components:page:v3">
    <content
        granite:class="cq-dialog-content-page"
        jcr:primaryType="nt:unstructured"
        sling:resourceType="granite/ui/components/coral/foundation/container">
        <items jcr:primaryType="nt:unstructured">
            <tabs
                granite:class="cq-siteadmin-admin-properties-tabs"
                jcr:primaryType="nt:unstructured"
                sling:resourceType="granite/ui/components/coral/foundation/tabs"
                size="L">
                <items jcr:primaryType="nt:unstructured">
                    <test
                        jcr:primaryType="nt:unstructured"
                        jcr:title="Test"
                        sling:resourceType="granite/ui/components/coral/foundation/fixedcolumns">
                        <items jcr:primaryType="nt:unstructured">
                            <column
                                    jcr:primaryType="nt:unstructured"
                                    sling:resourceType="granite/ui/components/coral/foundation/container">
                                <items jcr:primaryType="nt:unstructured">
                                    <itemMultifield
                                            jcr:primaryType="nt:unstructured"
                                            sling:resourceType="granite/ui/components/coral/foundation/form/multifield"
                                            fieldLabel="Add Item"
                                            composite="{Boolean}true">
                                        <field
                                                jcr:primaryType="nt:unstructured"
                                                sling:resourceType="granite/ui/components/coral/foundation/container"
                                                name="./textList">
                                            <items jcr:primaryType="nt:unstructured">
                                                <text
                                                    jcr:primaryType="nt:unstructured"
                                                    sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
                                                    fieldDescription="Text"
                                                    fieldLabel="Text"
                                                    name="./text"/>
                                            </items>
                                        </field>
                                    </itemMultifield>

                                </items>
                            </column>
                        </items>
                    </test>
                </items>
            </tabs>
        </items>
    </content>
</jcr:root>