Expand my Community achievements bar.

SOLVED

Making cq-msm-lockable on jcr:title of Experience Page

Avatar

Level 1

I would like to introduce manual enable/disable of inheritance for jcr:title property of experience pages (cq/experience-fragments/components/xfpage).
What I did for my override is
I created cq_dialog

<?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="Experience Fragment"
    sling:resourceType="cq/gui/components/authoring/dialog"
    extraClientlibs="[cq.common.wcm,core.wcm.page.properties,cq.wcm.msm.properties,cq.wcm.msm.properties,cq.siteadmin.admin.properties,cq.experience-fragments.properties.tabs,cq.experience-fragments.target.properties,granite.contexthub.configuration]"
    mode="edit">
    <content
        jcr:primaryType="nt:unstructured"
        sling:resourceType="granite/ui/components/coral/foundation/container"
        granite:class="cq-dialog-content-page">
        <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"
                maximized="{Boolean}true"
                size="L">
                <items jcr:primaryType="nt:unstructured">
                    <basic
                        jcr:primaryType="nt:unstructured"
                        sling:resourceType="granite/ui/components/coral/foundation/include"
                        path="/mnt/overlay/ap-com/ui/components/structure/pages/xfpage/tabs/basic"/>
                </items>
            </tabs>
        </items>
    </content>
</jcr:root>

And then under tabs/basic I created:

<?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="Basic"
    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">
                <title
                    jcr:primaryType="nt:unstructured"
                    jcr:title="Title and Tags"
                    sling:resourceType="granite/ui/components/coral/foundation/form/fieldset">
                    <items jcr:primaryType="nt:unstructured">
                        <title
                            jcr:primaryType="nt:unstructured"
                            sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
                            cq:showOnCreate="{Boolean}true"
                            fieldLabel="Title"
                            name="./jcr:title"
                            required="{Boolean}true">
                            <granite:data
                                jcr:primaryType="nt:unstructured"
                                cq-msm-lockable="jcr:title"/>
                        </title>
                        <pagename
                            cq:hideOnEdit="{Boolean}true"
                            cq:showOnCreate="{Boolean}true"
                            jcr:primaryType="nt:unstructured"
                            sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
                            fieldLabel="Name"
                            name="pageName"
                            validation="foundation.jcr.pagename"/>
                        <description
                            allowBulkEdit="{Boolean}true"
                            cq:showOnCreate="{Boolean}true"
                            jcr:primaryType="nt:unstructured"
                            sling:resourceType="granite/ui/components/coral/foundation/form/textarea"
                            fieldLabel="Description"
                            name="./jcr:description"/>
                        <tags
                            jcr:primaryType="nt:unstructured"
                            sling:resourceType="cq/gui/components/coral/common/form/tagfield"
                            allowBulkEdit="{Boolean}true"
                            allowCreate="{Boolean}true"
                            cq:showOnCreate="{Boolean}true"
                            fieldLabel="Tags"
                            multiple="{Boolean}true"
                            name="./cq:tags">
                        </tags>
                        <hideVariation
                            jcr:primaryType="nt:unstructured"
                            sling:resourceType="granite/ui/components/coral/foundation/form/checkbox"
                            name="./cq:xfShowInEditor"
                            fieldDescription="The variation cannot be used on web pages."
                            text="Hide in Editor"
                            value="{Boolean}false">
                        </hideVariation>
                        <charset
                            jcr:primaryType="nt:unstructured"
                            sling:resourceType="granite/ui/components/coral/foundation/form/hidden"
                            allowBulkEdit="{Boolean}true"
                            ignoreData="{Boolean}true"
                            name="_charset_"
                            value="utf-8"/>
                    </items>
                </title>
            </items>
        </column>
    </items>
</jcr:root>

However after deployment child that has connected source for live copy doesn't introduce "lock" icon on Title property.
Exactly same configuration worked properly for extension of core/wcm/components/page

 

Is there something missing?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@MB_IDW I think you didn't miss anything, but unfortunately, it's the behaviour with OOTB XFs and page properties level inheritance doesn't work for XF Live copy variation even though we set granite:data node at the dialog level.

 

 

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

@MB_IDW I think you didn't miss anything, but unfortunately, it's the behaviour with OOTB XFs and page properties level inheritance doesn't work for XF Live copy variation even though we set granite:data node at the dialog level.