<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Activate AEM on Medium]]></title>
        <description><![CDATA[Stories by Activate AEM on Medium]]></description>
        <link>https://medium.com/@activate-aem?source=rss-a96f06962b0a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by Activate AEM on Medium</title>
            <link>https://medium.com/@activate-aem?source=rss-a96f06962b0a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 20:58:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@activate-aem/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Conditional Display for Dialog Fields using OOTB Capabilities]]></title>
            <link>https://medium.com/activate-aem/conditional-display-for-dialog-fields-using-ootb-capabilities-a65e8ba59c36?source=rss-a96f06962b0a------2</link>
            <guid isPermaLink="false">https://medium.com/p/a65e8ba59c36</guid>
            <category><![CDATA[aem-dialog]]></category>
            <category><![CDATA[aem]]></category>
            <category><![CDATA[aem-developer]]></category>
            <category><![CDATA[adobe-experience-manager]]></category>
            <dc:creator><![CDATA[Activate AEM]]></dc:creator>
            <pubDate>Tue, 11 Apr 2023 20:55:23 GMT</pubDate>
            <atom:updated>2023-04-11T20:55:47.143Z</atom:updated>
            <content:encoded><![CDATA[<p>Creating TouchUI dialogs that can dynamically show or hide fields based on the user input can help to provide a cleaner authoring experience. This can keep the dialog simple and effective by only displaying the necessary fields based on the selection.</p><p>This can be performed either by drop-down selection, a checkbox or a radio button option in the dialog based on the requirement.</p><p>OOTB Show/Hide with dropdown:</p><p>The show/hide for dropdown is an OOTB feature available in AEM. We have the inbuilt JavaScript to perform this action in</p><p>/libs/cq/gui/components/authoring/dialog/dropdownshowhide/clientlibs/dropdownshowhide/js/dropdownshowhide.js</p><p>There are four simple steps to toggle the dialog fields based on our selection, let’s take the list component as an example.</p><ol><li>Add “cq-dialog-dropdown-showhide” class to the drop-down node</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ysfVFF7tQW9PCAw7" /></figure><p>2. Add the data attribute cq-dialog-dropdown-showhide-target to the dropdown/select element and value should be jQuery selector</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6DTGQusLPpByYSZq" /></figure><p>3. Add the target selector class to each target component that can be shown/hidden</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BTDwPO26VoTXkkJ8" /></figure><p>4. To hide or show the container based on the dropdown, add showhidetargetvalue which depends on the value of options in the dropdown (showhidetargetvalue = value of dropdown option). In this example the dropdown value for Child pages matching the show showhidetargetvalue</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rAn9l3NbrPqANz-t" /></figure><p>Based on the selection in the dropdown the fields /container is displayed or hidden in the dialog</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UyKeDIAdYrfynUpX" /></figure><p><strong>Full component dialog xml for reference (list/_cq_dialog/.content.xml) :</strong></p><pre>&lt;content<br>   granite:class=&quot;cmp-list__editor&quot;<br>   jcr:primaryType=&quot;nt:unstructured&quot;<br>   sling:resourceType=&quot;granite/ui/components/coral/foundation/container&quot;&gt;<br>   &lt;items jcr:primaryType=&quot;nt:unstructured&quot;&gt;<br>       &lt;tabs<br>           jcr:primaryType=&quot;nt:unstructured&quot;<br>           sling:resourceType=&quot;granite/ui/components/coral/foundation/tabs&quot;<br>           maximized=&quot;{Boolean}true&quot;&gt;<br>           &lt;items jcr:primaryType=&quot;nt:unstructured&quot;&gt;<br>               &lt;listSettings<br>                   jcr:primaryType=&quot;nt:unstructured&quot;<br>                   jcr:title=&quot;List Settings&quot;<br>                   sling:resourceType=&quot;granite/ui/components/coral/foundation/container&quot;<br>                   margin=&quot;{Boolean}true&quot;&gt;<br>                   &lt;items jcr:primaryType=&quot;nt:unstructured&quot;&gt;<br>                       &lt;columns<br>                           jcr:primaryType=&quot;nt:unstructured&quot;<br>                           sling:resourceType=&quot;granite/ui/components/coral/foundation/fixedcolumns&quot;<br>                           margin=&quot;{Boolean}true&quot;&gt;<br>                           &lt;items jcr:primaryType=&quot;nt:unstructured&quot;&gt;<br>                               &lt;column<br>                                   jcr:primaryType=&quot;nt:unstructured&quot;<br>                                   sling:resourceType=&quot;granite/ui/components/coral/foundation/container&quot;&gt;<br>                                   &lt;items jcr:primaryType=&quot;nt:unstructured&quot;&gt;<br>                                       &lt;listFrom<br>                                           granite:class=&quot;cq-dialog-dropdown-showhide&quot;<br>                                           jcr:primaryType=&quot;nt:unstructured&quot;<br>                                           sling:resourceType=&quot;granite/ui/components/coral/foundation/form/select&quot;<br>                                           cq-msm-lockable=&quot;./listFrom&quot;<br>                                           fieldLabel=&quot;Build List Using&quot;<br>                                           name=&quot;./listFrom&quot;&gt;<br>                                           &lt;granite:data<br>                                               jcr:primaryType=&quot;nt:unstructured&quot;<br>                                               cq-dialog-dropdown-showhide-target=&quot;.list-option-listfrom-showhide-target&quot;/&gt;<br>                                           &lt;items jcr:primaryType=&quot;nt:unstructured&quot;&gt;<br>                                               &lt;children<br>                                                   granite:hide=&quot;${cqDesign.disableChildren}&quot;<br>                                                   jcr:primaryType=&quot;nt:unstructured&quot;<br>                                                   text=&quot;Child pages&quot;<br>                                                   value=&quot;children&quot;/&gt;<br>                                               &lt;static<br>                                                   granite:hide=&quot;${cqDesign.disableStatic}&quot;<br>                                                   jcr:primaryType=&quot;nt:unstructured&quot;<br>                                                   text=&quot;Fixed list&quot;<br>                                                   value=&quot;static&quot;/&gt;<br>                                               &lt;search<br>                                                   granite:hide=&quot;${cqDesign.disableSearch}&quot;<br>                                                   jcr:primaryType=&quot;nt:unstructured&quot;<br>                                                   text=&quot;Search&quot;<br>                                                   value=&quot;search&quot;/&gt;<br>                                               &lt;tags<br>                                                   granite:hide=&quot;${cqDesign.disableTags}&quot;<br>                                                   jcr:primaryType=&quot;nt:unstructured&quot;<br>                                                   text=&quot;Tags&quot;<br>                                                   value=&quot;tags&quot;/&gt;<br>                                           &lt;/items&gt;<br>                                       &lt;/listFrom&gt;<br>                                       &lt;setChildren<br>                                           granite:class=&quot;hide list-option-listfrom-showhide-target foundation-layout-util-vmargin&quot;<br>                                           jcr:primaryType=&quot;nt:unstructured&quot;<br>                                           sling:resourceType=&quot;granite/ui/components/coral/foundation/container&quot;&gt;<br>                                           &lt;granite:data<br>                                               jcr:primaryType=&quot;nt:unstructured&quot;<br>                                               showhidetargetvalue=&quot;children&quot;/&gt;<br>                                           &lt;items jcr:primaryType=&quot;nt:unstructured&quot;&gt;<br>                                               &lt;heading<br>                                                   granite:class=&quot;coral-Heading coral-Heading--4&quot;<br>                                                   jcr:primaryType=&quot;nt:unstructured&quot;<br>                                                   sling:resourceType=&quot;granite/ui/components/coral/foundation/heading&quot;<br>                                                   level=&quot;{Long}4&quot;<br>                                                   text=&quot;Options for Child Pages&quot;/&gt;<br>                                               &lt;well<br>                                                   jcr:primaryType=&quot;nt:unstructured&quot;<br>                                                   sling:resourceType=&quot;granite/ui/components/coral/foundation/well&quot;&gt;<br>                                                   &lt;items jcr:primaryType=&quot;nt:unstructured&quot;&gt;<br>                                                       &lt;parentPage<br>                                                           jcr:primaryType=&quot;nt:unstructured&quot;<br>                                                           sling:resourceType=&quot;granite/ui/components/coral/foundation/form/pathfield&quot;<br>                                                           cq-msm-lockable=&quot;./parentPage&quot;<br>                                                           fieldDescription=&quot;Leave empty to use current page&quot;<br>                                                           fieldLabel=&quot;Parent Page&quot;<br>                                                           name=&quot;./parentPage&quot;<br>                                                           rootPath=&quot;/content&quot;/&gt;<br>                                                       &lt;childDepth<br>                                                           jcr:primaryType=&quot;nt:unstructured&quot;<br>                                                           sling:resourceType=&quot;granite/ui/components/coral/foundation/form/numberfield&quot;<br>                                                           cq-msm-lockable=&quot;./childDepth&quot;<br>                                                           fieldDescription=&quot;Controls how deep the child items can be added to the list&quot;<br>                                                           fieldLabel=&quot;Child Depth&quot;<br>                                                           max=&quot;100&quot;<br>                                                           min=&quot;1&quot;<br>                                                           name=&quot;./childDepth&quot;<br>                                                           step=&quot;1&quot;<br>                                                           value=&quot;1&quot;/&gt;<br>                                                   &lt;/items&gt;<br>                                               &lt;/well&gt;<br>                                           &lt;/items&gt;<br>                                       &lt;/setChildren&gt;<br>                                       &lt;setStatic<br>                                           granite:class=&quot;hide list-option-listfrom-showhide-target foundation-layout-util-vmargin&quot;<br>                                           jcr:primaryType=&quot;nt:unstructured&quot;<br>                                           sling:resourceType=&quot;granite/ui/components/coral/foundation/container&quot;&gt;<br>                                           &lt;granite:data<br>                                               jcr:primaryType=&quot;nt:unstructured&quot;<br>                                               showhidetargetvalue=&quot;static&quot;/&gt;<br>                                           &lt;items jcr:primaryType=&quot;nt:unstructured&quot;&gt;<br>                                               &lt;heading<br>                                                   granite:class=&quot;coral-Heading coral-Heading--4&quot;<br>                                                   jcr:primaryType=&quot;nt:unstructured&quot;<br>                                                   sling:resourceType=&quot;granite/ui/components/coral/foundation/heading&quot;<br>                                                   level=&quot;{Long}4&quot;<br>                                                   text=&quot;Options for Fixed List&quot;/&gt;<br>                                               &lt;well<br>                                                   jcr:primaryType=&quot;nt:unstructured&quot;<br>                                                   sling:resourceType=&quot;granite/ui/components/coral/foundation/well&quot;&gt;<br>                                                   &lt;items jcr:primaryType=&quot;nt:unstructured&quot;&gt;<br>                                                       &lt;pages<br>                                                           granite:class=&quot;foundation-layout-util-maximized-alt coral-Form-fieldwrapper&quot;<br>                                                           jcr:primaryType=&quot;nt:unstructured&quot;<br>                                                           sling:resourceType=&quot;granite/ui/components/coral/foundation/container&quot;&gt;<br>                                                           &lt;items jcr:primaryType=&quot;nt:unstructured&quot;&gt;<br>                                                               &lt;multi<br>                                                                   granite:class=&quot;&quot;<br>                                                                   jcr:primaryType=&quot;nt:unstructured&quot;<br>                                                                   sling:resourceType=&quot;granite/ui/components/coral/foundation/form/multifield&quot;&gt;<br>                                                                   &lt;field<br>                                                                       jcr:primaryType=&quot;nt:unstructured&quot;<br>                                                                       sling:resourceType=&quot;granite/ui/components/coral/foundation/form/pathfield&quot;<br>                                                                       cq-msm-lockable=&quot;./pages&quot;<br>                                                                       name=&quot;./pages&quot;<br>                                                                       rootPath=&quot;/content&quot;/&gt;<br>                                                               &lt;/multi&gt;<br>                                                           &lt;/items&gt;<br>                                                       &lt;/pages&gt;<br>                                                   &lt;/items&gt;<br>                                               &lt;/well&gt;<br>                                           &lt;/items&gt;<br>                                       &lt;/setStatic&gt;<br>                                       &lt;setSearch<br>                                           granite:class=&quot;hide list-option-listfrom-showhide-target foundation-layout-util-vmargin&quot;<br>                                           jcr:primaryType=&quot;nt:unstructured&quot;<br>                                           sling:resourceType=&quot;granite/ui/components/coral/foundation/container&quot;&gt;<br>                                           &lt;granite:data<br>                                               jcr:primaryType=&quot;nt:unstructured&quot;<br>                                               showhidetargetvalue=&quot;search&quot;/&gt;<br>                                           &lt;items jcr:primaryType=&quot;nt:unstructured&quot;&gt;<br>                                               &lt;heading<br>                                                   granite:class=&quot;coral-Heading coral-Heading--4&quot;<br>                                                   jcr:primaryType=&quot;nt:unstructured&quot;<br>                                                   sling:resourceType=&quot;granite/ui/components/coral/foundation/heading&quot;<br>                                                   level=&quot;{Long}4&quot;<br>                                                   text=&quot;Options for Search&quot;/&gt;<br>                                               &lt;well<br>                                                   jcr:primaryType=&quot;nt:unstructured&quot;<br>                                                   sling:resourceType=&quot;granite/ui/components/coral/foundation/well&quot;&gt;<br>                                                   &lt;items jcr:primaryType=&quot;nt:unstructured&quot;&gt;<br>                                                       &lt;query<br>                                                           jcr:primaryType=&quot;nt:unstructured&quot;<br>                                                           sling:resourceType=&quot;granite/ui/components/coral/foundation/form/textfield&quot;<br>                                                           cq-msm-lockable=&quot;./query&quot;<br>                                                           fieldLabel=&quot;Search Query&quot;<br>                                                           name=&quot;./query&quot;/&gt;<br>                                                       &lt;queryContentPath<br>                                                           jcr:primaryType=&quot;nt:unstructured&quot;<br>                                                           sling:resourceType=&quot;granite/ui/components/coral/foundation/form/pathfield&quot;<br>                                                           cq-msm-lockable=&quot;./searchIn&quot;<br>                                                           fieldDescription=&quot;Leave empty to use current site (eg. /content/mysite)&quot;<br>                                                           fieldLabel=&quot;Search In&quot;<br>                                                           name=&quot;./searchIn&quot;<br>                                                           rootPath=&quot;/content&quot;/&gt;<br>                                                   &lt;/items&gt;<br>                                               &lt;/well&gt;<br>                                           &lt;/items&gt;<br>                                       &lt;/setSearch&gt;<br>                                       &lt;setTags<br>                                           granite:class=&quot;hide list-option-listfrom-showhide-target foundation-layout-util-vmargin&quot;<br>                                           jcr:primaryType=&quot;nt:unstructured&quot;<br>                                           sling:resourceType=&quot;granite/ui/components/coral/foundation/container&quot;&gt;<br>                                           &lt;granite:data<br>                                               jcr:primaryType=&quot;nt:unstructured&quot;<br>                                               showhidetargetvalue=&quot;tags&quot;/&gt;<br>                                           &lt;items jcr:primaryType=&quot;nt:unstructured&quot;&gt;<br>                                               &lt;heading<br>                                                   granite:class=&quot;coral-Heading coral-Heading--4&quot;<br>                                                   jcr:primaryType=&quot;nt:unstructured&quot;<br>                                                   sling:resourceType=&quot;granite/ui/components/coral/foundation/heading&quot;<br>                                                   level=&quot;{Long}4&quot;<br>                                                   text=&quot;Options for Tags&quot;/&gt;<br>                                               &lt;well<br>                                                   jcr:primaryType=&quot;nt:unstructured&quot;<br>                                                   sling:resourceType=&quot;granite/ui/components/coral/foundation/well&quot;&gt;<br>                                                   &lt;items jcr:primaryType=&quot;nt:unstructured&quot;&gt;<br>                                                       &lt;parentPage<br>                                                           jcr:primaryType=&quot;nt:unstructured&quot;<br>                                                           sling:resourceType=&quot;granite/ui/components/coral/foundation/form/pathfield&quot;<br>                                                           cq-msm-lockable=&quot;./tagsSearchRoot&quot;<br>                                                           fieldDescription=&quot;Leave empty to use current page&quot;<br>                                                           fieldLabel=&quot;Parent Page&quot;<br>                                                           name=&quot;./tagsSearchRoot&quot;<br>                                                           rootPath=&quot;/content&quot;/&gt;<br>                                                       &lt;tags<br>                                                           jcr:primaryType=&quot;nt:unstructured&quot;<br>                                                           sling:resourceType=&quot;cq/gui/components/coral/common/form/tagfield&quot;<br>                                                           cq-msm-lockable=&quot;./tags&quot;<br>                                                           fieldLabel=&quot;Tags&quot;<br>                                                           multiple=&quot;{Boolean}true&quot;<br>                                                           name=&quot;./tags&quot;/&gt;<br>                                                       &lt;match<br>                                                           jcr:primaryType=&quot;nt:unstructured&quot;<br>                                                           sling:resourceType=&quot;granite/ui/components/coral/foundation/form/select&quot;<br>                                                           cq-msm-lockable=&quot;./tagsMatch&quot;<br>                                                           fieldLabel=&quot;Match&quot;<br>                                                           name=&quot;./tagsMatch&quot;&gt;<br>                                                           &lt;items jcr:primaryType=&quot;nt:unstructured&quot;&gt;<br>                                                               &lt;any<br>                                                                   jcr:primaryType=&quot;nt:unstructured&quot;<br>                                                                   text=&quot;Any tag&quot;<br>                                                                   value=&quot;any&quot;/&gt;<br>                                                               &lt;all<br>                                                                   jcr:primaryType=&quot;nt:unstructured&quot;<br>                                                                   text=&quot;All tags&quot;<br>                                                                   value=&quot;all&quot;/&gt;<br>                                                           &lt;/items&gt;<br>                                                       &lt;/match&gt;<br>                                                   &lt;/items&gt;<br>                                               &lt;/well&gt;<br>                                           &lt;/items&gt;<br>                                       &lt;/setTags&gt;<br>                                       &lt;orderBy<br>                                           jcr:primaryType=&quot;nt:unstructured&quot;<br>                                           sling:resourceType=&quot;granite/ui/components/coral/foundation/form/select&quot;<br>                                           cq-msm-lockable=&quot;./orderBy&quot;<br>                                           emptyOption=&quot;{Boolean}true&quot;<br>                                           fieldDescription=&quot;Enter a property like &#39;jcr:created&#39;&quot;<br>                                           fieldLabel=&quot;Order By&quot;<br>                                           name=&quot;./orderBy&quot;<br>                                           type=&quot;editable&quot;&gt;<br>                                           &lt;items jcr:primaryType=&quot;nt:unstructured&quot;&gt;<br>                                               &lt;title<br>                                                   jcr:primaryType=&quot;nt:unstructured&quot;<br>                                                   text=&quot;Title&quot;<br>                                                   value=&quot;title&quot;/&gt;<br>                                               &lt;modified<br>                                                   jcr:primaryType=&quot;nt:unstructured&quot;<br>                                                   text=&quot;Last modified date&quot;<br>                                                   value=&quot;modified&quot;/&gt;<br>                                           &lt;/items&gt;<br>                                       &lt;/orderBy&gt;<br>                                       &lt;sortOrder<br>                                           jcr:primaryType=&quot;nt:unstructured&quot;<br>                                           sling:resourceType=&quot;granite/ui/components/coral/foundation/form/select&quot;<br>                                           cq-msm-lockable=&quot;./sortOrder&quot;<br>                                           fieldDescription=&quot;Sort order ascending or descending&quot;<br>                                           fieldLabel=&quot;Sort Order&quot;<br>                                           name=&quot;./sortOrder&quot;<br>                                           type=&quot;editable&quot;&gt;<br>                                           &lt;items jcr:primaryType=&quot;nt:unstructured&quot;&gt;<br>                                               &lt;asc<br>                                                   jcr:primaryType=&quot;nt:unstructured&quot;<br>                                                   text=&quot;Ascending&quot;<br>                                                   value=&quot;asc&quot;/&gt;<br>                                               &lt;desc<br>                                                   jcr:primaryType=&quot;nt:unstructured&quot;<br>                                                   text=&quot;Descending&quot;<br>                                                   value=&quot;desc&quot;/&gt;<br>                                           &lt;/items&gt;<br>                                       &lt;/sortOrder&gt;<br>                                       &lt;maxItems<br>                                           jcr:primaryType=&quot;nt:unstructured&quot;<br>                                           sling:resourceType=&quot;granite/ui/components/coral/foundation/form/numberfield&quot;<br>                                           cq-msm-lockable=&quot;./maxItems&quot;<br>                                           fieldDescription=&quot;Maximum number of items displayed in list. Empty for all items.&quot;<br>                                           fieldLabel=&quot;Max Items&quot;<br>                                           min=&quot;{Long}0&quot;<br>                                           name=&quot;./maxItems&quot;/&gt;<br>                                   &lt;/items&gt;<br>                               &lt;/column&gt;<br>                           &lt;/items&gt;<br>                       &lt;/columns&gt;<br>                   &lt;/items&gt;<br>               &lt;/listSettings&gt;<br>               &lt;itemSettings<br>                   jcr:primaryType=&quot;nt:unstructured&quot;<br>                   jcr:title=&quot;Item Settings&quot;<br>                   sling:resourceType=&quot;granite/ui/components/coral/foundation/container&quot;<br>                   margin=&quot;{Boolean}true&quot;&gt;<br>                   &lt;items jcr:primaryType=&quot;nt:unstructured&quot;&gt;<br>                       &lt;columns<br>                           jcr:primaryType=&quot;nt:unstructured&quot;<br>                           sling:resourceType=&quot;granite/ui/components/coral/foundation/fixedcolumns&quot;<br>                           margin=&quot;{Boolean}true&quot;&gt;<br>                           &lt;items jcr:primaryType=&quot;nt:unstructured&quot;&gt;<br>                               &lt;column<br>                                   jcr:primaryType=&quot;nt:unstructured&quot;<br>                                   sling:resourceType=&quot;granite/ui/components/coral/foundation/container&quot;&gt;<br>                                   &lt;items jcr:primaryType=&quot;nt:unstructured&quot;&gt;<br>                                       &lt;linkItems<br>                                           jcr:primaryType=&quot;nt:unstructured&quot;<br>                                           sling:resourceType=&quot;granite/ui/components/coral/foundation/form/checkbox&quot;<br>                                           checked=&quot;${not empty cqDesign.linkItems ? cqDesign.linkItems : false}&quot;<br>                                           cq-msm-lockable=&quot;./linkItems&quot;<br>                                           fieldDescription=&quot;Link items to the corresponding page&quot;<br>                                           name=&quot;./linkItems&quot;<br>                                           text=&quot;Link items&quot;<br>                                           uncheckedValue=&quot;false&quot;<br>                                           value=&quot;true&quot;/&gt;<br>                                       &lt;showDescription<br>                                           jcr:primaryType=&quot;nt:unstructured&quot;<br>                                           sling:resourceType=&quot;granite/ui/components/coral/foundation/form/checkbox&quot;<br>                                           checked=&quot;${not empty cqDesign.showDescription ? cqDesign.showDescription : false}&quot;<br>                                           cq-msm-lockable=&quot;./showDescription&quot;<br>                                           fieldDescription=&quot;Show descriptions of the link item&quot;<br>                                           name=&quot;./showDescription&quot;<br>                                           text=&quot;Show description&quot;<br>                                           uncheckedValue=&quot;false&quot;<br>                                           value=&quot;true&quot;/&gt;<br>                                       &lt;showModificationDate<br>                                           jcr:primaryType=&quot;nt:unstructured&quot;<br>                                           sling:resourceType=&quot;granite/ui/components/coral/foundation/form/checkbox&quot;<br>                                           checked=&quot;${not empty cqDesign.showModificationDate ? cqDesign.showModificationDate : false}&quot;<br>                                           cq-msm-lockable=&quot;./showModificationDate&quot;<br>                                           fieldDescription=&quot;Show modification date of the link item&quot;<br>                                           name=&quot;./showModificationDate&quot;<br>                                           text=&quot;Show date&quot;<br>                                           uncheckedValue=&quot;false&quot;<br>                                           value=&quot;true&quot;/&gt;<br>                                   &lt;/items&gt;<br>                               &lt;/column&gt;<br>                           &lt;/items&gt;<br>                       &lt;/columns&gt;<br>                   &lt;/items&gt;<br>               &lt;/itemSettings&gt;<br>               &lt;properties<br>                   jcr:primaryType=&quot;nt:unstructured&quot;<br>                   jcr:title=&quot;Properties&quot;<br>                   sling:resourceType=&quot;granite/ui/components/coral/foundation/container&quot;<br>                   margin=&quot;{Boolean}true&quot;&gt;<br>                   &lt;items jcr:primaryType=&quot;nt:unstructured&quot;&gt;<br>                       &lt;columns<br>                           jcr:primaryType=&quot;nt:unstructured&quot;<br>                           sling:resourceType=&quot;granite/ui/components/coral/foundation/fixedcolumns&quot;<br>                           margin=&quot;{Boolean}true&quot;&gt;<br>                           &lt;items jcr:primaryType=&quot;nt:unstructured&quot;&gt;<br>                               &lt;column<br>                                   jcr:primaryType=&quot;nt:unstructured&quot;<br>                                   sling:resourceType=&quot;granite/ui/components/coral/foundation/container&quot;&gt;<br>                                   &lt;items jcr:primaryType=&quot;nt:unstructured&quot;&gt;<br>                                       &lt;id<br>                                           jcr:primaryType=&quot;nt:unstructured&quot;<br>                                           sling:resourceType=&quot;granite/ui/components/coral/foundation/form/textfield&quot;<br>                                           fieldDescription=&quot;HTML ID attribute to apply to the component.&quot;<br>                                           fieldLabel=&quot;ID&quot;<br>                                           name=&quot;./id&quot;/&gt;<br>                                   &lt;/items&gt;<br>                               &lt;/column&gt;<br>                           &lt;/items&gt;<br>                       &lt;/columns&gt;<br>                   &lt;/items&gt;<br>               &lt;/properties&gt;<br>           &lt;/items&gt;<br>       &lt;/tabs&gt;<br>   &lt;/items&gt;<br>&lt;/content&gt;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a65e8ba59c36" width="1" height="1" alt=""><hr><p><a href="https://medium.com/activate-aem/conditional-display-for-dialog-fields-using-ootb-capabilities-a65e8ba59c36">Conditional Display for Dialog Fields using OOTB Capabilities</a> was originally published in <a href="https://medium.com/activate-aem">Activate AEM</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Granite Render Conditions]]></title>
            <link>https://medium.com/activate-aem/granite-render-conditions-5db1715fc9ba?source=rss-a96f06962b0a------2</link>
            <guid isPermaLink="false">https://medium.com/p/5db1715fc9ba</guid>
            <category><![CDATA[aem-features]]></category>
            <category><![CDATA[aemasacloudservice]]></category>
            <category><![CDATA[aem]]></category>
            <category><![CDATA[aem-developer]]></category>
            <category><![CDATA[aem-architect]]></category>
            <dc:creator><![CDATA[Activate AEM]]></dc:creator>
            <pubDate>Wed, 22 Mar 2023 22:06:30 GMT</pubDate>
            <atom:updated>2023-03-22T22:26:09.761Z</atom:updated>
            <content:encoded><![CDATA[<p>Has this happened to you?</p><p>You’re going about your day, working in Adobe Experience Manager (AEM) when a request comes in. Your teammate or client wants five custom user groups, and requires a different complement of authoring options for each of them. Certain menu items and selection actions must only show up for members of designated groups.</p><figure><img alt="AEM author action bar" src="https://cdn-images-1.medium.com/max/703/0*DyvQxI7YZbFBUM_W" /></figure><p>Setting read-modify-create-delete-replication (RMCDR) permissions via /useradmin doesn’t get the whole job done. You need to restrict Quick Publish to an Asset Manager group without causing the Manage Publication action to disappear for non-members. Denying Replicate hides them both. That won’t meet requirements.</p><figure><img alt="JCR permissions" src="https://cdn-images-1.medium.com/max/633/0*pAaANUuUksB0mOlD" /></figure><p>On top of that, you have custom menu actions not tied to RMCDR in any way. They may only display based upon various user, file disposition, and state criteria.</p><p>How are you possibly going to be able to complete this request?</p><h3>Granite Render Conditions</h3><p>AEM provides a flexible way to hide or show almost any user interface (UI) element. Render conditions provide this control, and AEM comes with a huge number of them available for your use.</p><p>A render condition is a mechanism that decides if a component should be displayed or not. It will drill-down through sub-conditions, evaluating them recursively, and return true or false. The Granite UI Foundation provides a set of built-in render conditions.</p><p>When coding rules of this type, consider the two implementation choices:</p><ol><li>Expression properties — placed directly on the granite:rendercondition node.</li><li>Stackable references to render condition components — placed <strong>underneath</strong> the granite:rendercondition node.</li></ol><p>Expression properties can only draw from the <a href="https://docs.adobe.com/content/help/en/experience-manager-htl/using/htl/global-objects.html"><strong>HTL Global Object</strong></a> context, which does not expose the user’s groups for evaluation. Another gap is the challenge in building up equivalent nested sub-conditions inside EL statements. To address the stated business problem, this post will focus on the second approach.</p><p>One of the built-in render conditions appears to do just what we need. It is a component that validates against a group property, and is located at: /libs/fd/fm/gui/components/admin/renderconditions/groups</p><h3>Step One: Create an Overlay of the Action</h3><p>In /libs, locate the action that will receive display rules, and overlay it in /apps.</p><p>Let’s change the display behavior for the Quick Publish selection action. This controls when Quick Publish will show up after a user has selected one or more DAM assets or pages. It already has a couple of render conditions. We will add a third, restricting display to members of the asset-admin group.</p><p>Here is our overlay:</p><figure><img alt="View of JCR" src="https://cdn-images-1.medium.com/max/285/0*DP800FNz_Rg8QNWV" /></figure><h3>Step Two: Add a Render Condition</h3><p>Under granite:rendercondition, add:</p><pre>+ and<br>  - sling:resourceType = &quot;granite/ui/components/coral/foundation/renderconditions/and&quot;<br>  + isInGroup<br>    - sling:resourceType = &quot;/libs/fd/fm/gui/components/admin/renderconditions/groups&quot;<br>    - group = &quot;asset-admin&quot;</pre><p>Try it out, and you’ll see that Quick Publish only shows up if you are a member of the asset-admin group.</p><h3>Step Three: Overlay the Group Render Condition</h3><p>Next, we’ll want to make another change. This render condition component is located in the /admin section, and won’t run unless you are an admin. We want to move it out of there.</p><p>Overlay it in your project folder, and change the sling:resourceType to match. For example: “/apps/&lt;yourproject&gt;/components/renderconditions/groups”</p><h3>Step Four: Improve the Group Matching Logic</h3><p>Now our menu element will only show up for members of a single group. But the OOB component does not recognize an array of groups. Wouldn’t that be better? Then it would be more broadly re-usable.</p><p>Edit groups.jsp, and change it to:</p><pre>&lt;%@page session=&quot;false&quot;<br>          import=&quot;com.adobe.granite.ui.components.Config,<br>                  com.adobe.granite.ui.components.rendercondition.RenderCondition,<br>                  com.adobe.granite.ui.components.rendercondition.SimpleRenderCondition,<br>                  org.apache.jackrabbit.api.security.user.UserManager,<br>                  com.adobe.aem.formsndocuments.util.FMUtils&quot; %&gt;&lt;%<br><br>Config cfg = cmp.getConfig();<br>UserManager um = resourceResolver.adaptTo(UserManager.class);<br>boolean isAllowed = false;<br><br>String[] groups = cfg.get(&quot;groups&quot;, String[].class);<br><br>for (String group : groups) {<br>    if( FMUtils.isUserPartOfGroup(request.getUserPrincipal(), um, group) ) {<br>        isAllowed = true;<br>        break;<br>    }<br>}<br><br>request.setAttribute(RenderCondition.class.getName(), new SimpleRenderCondition(isAllowed));<br>%&gt;</pre><p>Rename the ‘group’ property to ‘groups’, convert it to String[], and add more groups.</p><pre>  + isInGroup<br>    - sling:resourceType = &quot;/apps/myproject/components/renderconditions/groups&quot;<br>    - groups = &quot;asset-admin,asset-manager&quot;</pre><p>After this refactor, the component will iterate through all values in the groups array, returning true if any match. It can fulfill all our group matching directives.</p><h3>Step Five: More Complex Requirements</h3><p>Now that our teammate and/or client know what we can do, they’re getting more demanding. They’ve added the requirement that regular authors should not be able to request publication of videos. Only video authors should be allowed to do this. But managers and admins are allowed to publish anything. That would mean restricting the Manage Publication contextual action based upon multiple criteria. Here’s how we can model the behavior.</p><p>After searching through the JCR for applicable components, we stumble across this one:</p><p>/libs/dam/gui/coral/components/commons/renderconditions/videoasset.</p><p>It should do nicely. Let’s combine it with our new groups component and leverage the not ‘operator.’ This is one of six base render condition components. See the <a href="https://helpx.adobe.com/experience-manager/6-5/sites/developing/using/reference-materials/granite-ui/api/jcr_root/libs/granite/ui/components/coral/foundation/renderconditions/index.html"><strong>Granite UI Foundation docs</strong></a>.</p><pre>+ managepublication<br>  - sling:resourceType = &quot;granite/ui/components/coral/foundation/collection/action&quot;<br>  + data<br>    - href.uritemplate = &quot;/mnt/overlay/dam/gui/content/commons/managepublicationwizard.html{?item*}&quot;<br>  + granite:rendercondition<br>    - sling:resourceType = &quot;granite/ui/components/coral/foundation/renderconditions/or&quot;<br>    + condition1<br>      - sling:resourceType = &quot;granite/ui/components/coral/foundation/renderconditions/and&quot;<br>      + isInGroup<br>        - sling:resourceType = &quot;/apps/myproject/components/renderconditions/groups&quot;<br>        - groups = &quot;asset-video-author,asset-manager,asset-admin&quot;<br>      + isVideo<br>        - sling:resourceType = &quot;/libs/dam/gui/coral/components/commons/renderconditions/videoasset&quot;<br>    + condition2<br>      - sling:resourceType = &quot;granite/ui/components/coral/foundation/renderconditions/and&quot;<br>      + isInGroup<br>        - sling:resourceType = &quot;/apps/myproject/components/renderconditions/groups&quot;<br>        - groups = &quot;asset-author,asset-manager,asset-admin&quot;<br>      + not<br>        - sling:resourceType = &quot;granite/ui/components/coral/foundation/renderconditions/not&quot;<br>        + isVideo<br>          - sling:resourceType = &quot;/libs/dam/gui/coral/components/commons/renderconditions/videoasset&quot;</pre><p>Notice how in some cases we can reference OOTB render condition components from /libs without doing an overlay?</p><p><strong>Tip</strong>: When customizing DAM actions behavior, you can freely reference everything in /libs/dam/gui/coral/components/commons.</p><h3>Step Six: Sweep Away the Clutter</h3><p>The DAM menu is a little too busy for some user types, wouldn’t you say?</p><p>For example — why should users who only have read on /content/dam be able to see the Copy contextual menu option? Where can they copy to? This action is enabled by default for all users in AEM 6.5. No longer.</p><pre>+ copyasset<br>  - sling:resourceType = &quot;granite/ui/components/coral/foundation/collection/action&quot;<br>  + granite:rendercondition<br>    - sling:resourceType = &quot;granite/ui/components/coral/foundation/renderconditions/and&quot;<br>    + mainasset<br>      - sling:resourceType = &quot;dam/gui/coral/components/commons/renderconditions/mainasset&quot;<br>    + not<br>      - sling:resourceType = &quot;granite/ui/components/coral/foundation/renderconditions/not&quot; <br>      + isInGroup<br>        - sling:resourceType = &quot;/apps/myproject/components/renderconditions/groups&quot;<br>        - groups = &quot;asset-viewer&quot;</pre><p>Also, why do read-only users see a Manage Tags option? Tags are already viewable via Properties. I know they can’t actually save the tags, but come on. Read-Only can’t ‘manage’ anything. Let’s change that.</p><pre>+ managetags<br>  - sling:resourceType = &quot;granite/ui/components/coral/foundation/collection/action&quot;<br>  + granite:rendercondition<br>    - sling:resourceType = &quot;granite/ui/components/coral/foundation/renderconditions/and&quot;<br>    + data<br>      - href.uritemplate = &quot;/aem/managetags.html{+item}&quot;<br>    + not<br>      - sling:resourceType = &quot;granite/ui/components/coral/foundation/renderconditions/not&quot; <br>      + isInGroup<br>        - sling:resourceType = &quot;/apps/myproject/components/renderconditions/groups&quot;<br>        - groups = &quot;asset-viewer&quot;</pre><h3>AEM’s OOB Render Conditions</h3><p>And there you have it! Now, you can create custom user groups with specific authoring options for each — hiding or showing menu items and selection actions for each of the designated groups as needed.</p><p>Below you will find a list of all the render conditions that ship with AEM 6.5. Many of these can be referenced from libs. Others can serve as inspiration for overlays. The sky is really the limit here. Adobe has given us a great head start and a large library to draw from.</p><pre>screens/dcc/components/renderconditions/hasProperty<br>cq/workflow/admin/console/components/rendercondition/overriddenmodel<br>cq/workflow/admin/console/components/rendercondition/emptyproperty<br>cq/personalization/touch-ui/components/renderconditions/localoractivetargetactivity<br>cq/personalization/touch-ui/components/renderconditions/activetargetactivity<br>cq/personalization/touch-ui/components/renderconditions/nondeactivatedactivity<br>cq/personalization/touch-ui/components/renderconditions/inactivetargetactivity<br>cq/personalization/touch-ui/components/renderconditions/hastargetconfig<br>cq/personalization/touch-ui/components/renderconditions/cancreateaudience<br>cq/personalization/touch-ui/components/renderconditions/targetactivity<br>cq/gui/components/renderconditions/canwriteworkflow<br>cq/gui/components/renderconditions/notfound<br>cq/gui/components/renderconditions/policy<br>cq/gui/components/renderconditions/canmodify<br>cq/gui/components/renderconditions/enablefragmentidentifier<br>cq/gui/components/renderconditions/isinapps<br>cq/gui/components/renderconditions/islocked<br>cq/gui/components/renderconditions/islaunchresource<br>cq/gui/components/renderconditions/canreplicate<br>cq/gui/components/renderconditions/ismobileresource<br>cq/gui/components/renderconditions/hasanalytics<br>cq/gui/components/renderconditions/canreadworkflowmodels<br>cq/gui/components/workflow/editor/rendercondition/workflow<br>cq/gui/components/projects/admin/renderconditions/noMasterSpecified<br>cq/gui/components/projects/admin/renderconditions/parentInMasterFolder<br>cq/gui/components/projects/admin/renderconditions/taskwriteaccess<br>cq/gui/components/projects/admin/renderconditions/withoutteamreference<br>cq/gui/components/projects/admin/renderconditions/workflowinproject<br>cq/gui/components/projects/admin/translation/renderconditions/addtranslationobjectaccess<br>cq/gui/components/siteadmin/admin/properties/renderconditions/canedit<br>cq/gui/components/coral/common/admin/renderconditions/mediaportal-config<br>cq/gui/components/authoring/editors/rendercondition/template<br>cq/gui/components/authoring/editors/rendercondition/page<br>cq/gui/components/authoring/pageinfo/renderconditions/replicate<br>cq/translation/cloudservices/rendercondition/isProjectAdmin<br>cq/translation/cloudservices/rendercondition/isWorkflowUser<br>cq/inbox/gui/components/inbox/itemdetails/tabs/rendercondition/isworkitem<br>cq/inbox/gui/components/inbox/itemdetails/tabs/rendercondition/istask<br>cq/inbox/gui/components/inbox/itemdetails/tabs/rendercondition/hasprojectinfo<br>cq/inbox/gui/components/inbox/itemdetails/tabs/rendercondition/isfailureitem<br>cq/inbox/gui/components/inbox/itemdetails/tabs/rendercondition/hasworkflowinfo<br>fd/af/dor/rendercondition/tab<br>fd/af/authoring/editors/rendercondition/theme<br>fd/af/authoring/editors/rendercondition/form<br>fd/af/authoring/editors/rendercondition/template<br>fd/fm/gui/components/admin/renderconditions/groups<br>commerce/gui/components/admin/collections/renderconditions/productbasedcollection<br>commerce/gui/components/admin/collections/renderconditions/collectionbasedcollection<br>commerce/gui/components/admin/collections/renderconditions/querybasedcollection<br>social/console/components/renderconditions/createtenant<br>social/console/components/renderconditions/createGroupBtnRenderCondition<br>social/console/components/renderconditions/createsite<br>dam/components/configurations/dm/youtube/edit/channellist/renderconditions/channels<br>dam/cfm/admin/components/renderconditions/associatedcontent<br>dam/cfm/admin/components/renderconditions/fragment<br>dam/cfm/admin/components/renderconditions/contentfragment<br>dam/cfm/components/renderconditions/hasfragment<br>dam/cfm/models/console/components/renderconditions/displayInNav<br>dam/gui/components/s7dam/sets/datasources/singleassetdatasource/renderconditions/asset<br>dam/gui/components/s7dam/common/rendercondition/dm<br>dam/gui/components/s7dam/common/rendercondition/dms7<br>dam/gui/components/s7dam/dmrenderconditions/dmasset<br>dam/gui/components/s7dam/dmrenderconditions/assettyperendercondition<br>dam/gui/components/s7dam/dmrenderconditions/remoteasset<br>dam/gui/components/s7dam/dmrenderconditions/s7assetready<br>dam/gui/components/s7dam/dmrenderconditions/canwrite<br>dam/gui/components/admin/renderconditions/cancheckout<br>dam/gui/components/admin/renderconditions/isparentassetcheckedout<br>dam/gui/components/admin/renderconditions/cancheckin<br>dam/gui/components/admin/renderconditions/isviewablebycurrentuserandhasnotexpired<br>dam/gui/components/admin/renderconditions/fragmentsenabled<br>dam/gui/components/admin/renderconditions/islivecopysource<br>dam/gui/components/admin/renderconditions/scene7<br>dam/gui/components/admin/renderconditions/ischeckedout<br>dam/gui/components/admin/renderconditions/dynamicmedia<br>dam/gui/components/admin/renderconditions/contentfragment<br>dam/gui/components/admin/renderconditions/isparentassetcheckedoutbycurrentuser<br>dam/gui/components/admin/renderconditions/checkedout<br>dam/gui/components/admin/renderconditions/iscurrentuseradmin<br>dam/gui/components/admin/renderconditions/ischeckedoutbycurrentuser<br>dam/gui/coral/components/commons/renderconditions/propertyValue<br>dam/gui/coral/components/commons/renderconditions/isimage<br>dam/gui/coral/components/commons/renderconditions/mainasset<br>dam/gui/coral/components/commons/renderconditions/stockaccessible<br>dam/gui/coral/components/commons/renderconditions/haspages<br>dam/gui/coral/components/commons/renderconditions/isdiskusagereport<br>dam/gui/coral/components/commons/renderconditions/stockassetlicensed<br>dam/gui/coral/components/commons/renderconditions/propertypagepermission<br>dam/gui/coral/components/commons/renderconditions/hasreviewstatus<br>dam/gui/coral/components/commons/renderconditions/videoasset<br>dam/gui/coral/components/commons/renderconditions/isnotlinksharereport<br>dam/gui/coral/components/commons/renderconditions/onpage<br>dam/gui/coral/components/commons/renderconditions/canextract<br>dam/gui/coral/components/commons/renderconditions/isfolder<br>dam/gui/coral/components/commons/renderconditions/haspermissions<br>dam/gui/coral/components/commons/renderconditions/removeprivaterendercondition<br>dam/gui/coral/components/commons/renderconditions/isassetexpired<br>dam/gui/coral/components/commons/renderconditions/istextasset<br>dam/gui/coral/components/commons/renderconditions/stockasseteditorial<br>dam/gui/coral/components/commons/renderconditions/hasannotations<br>dam/gui/coral/components/commons/renderconditions/singleitem<br>dam/gui/coral/components/commons/renderconditions/hassubassets<br>dam/gui/coral/components/commons/renderconditions/stockasset<br>dam/gui/coral/components/commons/ui/shell/datasources/assetsdatasource/renderconditions/directory<br>dam/gui/coral/components/commons/ui/shell/datasources/assetsdatasource/renderconditions/asset<br>dam/gui/coral/components/admin/renderconditions/userprop<br>dam/gui/coral/components/admin/renderconditions/macshare<br>dam/gui/coral/components/admin/renderconditions/locked<br>dam/gui/coral/components/admin/renderconditions/sync-config<br>dam/gui/coral/components/admin/foldershare/renderconditions/hasmetadataschema<br>dam/gui/coral/components/admin/foldershare/renderconditions/foldermetadataschema<br>dam/gui/coral/components/admin/collections/collectiondatasource/renderconditions/collection<br>dam/gui/coral/components/admin/stock/renderconditions/stockassetlicensed<br>wcm/msm/components/touch-ui/renderconditions/isblueprint<br>wcm/msm/components/touch-ui/renderconditions/islivecopy<br>wcm/msm/gui/components/renderconditions/capability<br>wcm/designimporter/components/touch-ui/renderconditions/isimporterpage<br>wcm/designimporter/components/touch-ui/renderconditions/hascanvas<br>granite/ui/components/foundation/renderconditions/feature<br>granite/ui/components/foundation/renderconditions/or<br>granite/ui/components/foundation/renderconditions/privilege<br>granite/ui/components/foundation/renderconditions/simple<br>granite/ui/components/foundation/renderconditions/not<br>granite/ui/components/foundation/renderconditions/and<br>granite/ui/components/coral/foundation/renderconditions/feature<br>granite/ui/components/coral/foundation/renderconditions/or<br>granite/ui/components/coral/foundation/renderconditions/privilege<br>granite/ui/components/coral/foundation/renderconditions/simple<br>granite/ui/components/coral/foundation/renderconditions/not<br>granite/ui/components/coral/foundation/renderconditions/and<br>granite/oauth/components/renderconditions/revocationactive</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5db1715fc9ba" width="1" height="1" alt=""><hr><p><a href="https://medium.com/activate-aem/granite-render-conditions-5db1715fc9ba">Granite Render Conditions</a> was originally published in <a href="https://medium.com/activate-aem">Activate AEM</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>