How to hide specific inherited design dialog field | Community
Skip to main content
tushaar_srivastava
Level 6
November 2, 2021
Solved

How to hide specific inherited design dialog field

  • November 2, 2021
  • 1 reply
  • 2868 views

Created a component and extended to core image component

I have used sling:hideChildren property to hide the Inherited fields from design dialog,
Now I am trying to hide OOB width i.e. /libs/core/wcm/components/image/v3/image/cq:design_dialog/content/items/tabs/items/properties/items/content/items/widths

but not able to hide the width using sling:hideChildren in design 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="Image" sling:resourceType="cq/gui/components/authoring/dialog" helpPath="https://www.adobe.com/go/aem_cmp_image_v3"> <content granite:class="cmp-image__editor" jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/container"> <items jcr:primaryType="nt:unstructured"> <tabs jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/tabs" maximized="{Boolean}true"> <items jcr:primaryType="nt:unstructured"> <properties jcr:primaryType="nt:unstructured" jcr:title="Main" sling:resourceType="granite/ui/components/coral/foundation/container" margin="{Boolean}true"> <items jcr:primaryType="nt:unstructured"> <content jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/container" margin="{Boolean}false"> <items jcr:primaryType="nt:unstructured" sling:hideChildren="[resizeWidth,allowedRenditionWidths,altValueFromDAM,titleValueFromDAM,jpegQuality]"> </items> </content> </items> </properties> <styletab jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/include" path="/mnt/overlay/cq/gui/components/authoring/dialog/style/tab_design/styletab"/> </items> </tabs> </items> </content> </jcr:root>

 

 

@vijayalakshmi_s  @arunpatidar  @briankasingli  @kautuk_sahni  @bhuwan_b @nikhil-kumar 

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 Vijayalakshmi_S

Hi @tushaar_srivastava,

If you don't want the widths (multifield), then we need to mention the same and not the field under it which is allowRenditionWidths 

<itemsjcr:primaryType="nt:unstructured"sling:hideChildren="[resizeWidth,altValueFromDAM,titleValueFromDAM,jpegQuality,widths ]">

 

or if you are looking to retain the widths multifield and amend only the fields under it, then we need to have widths node overridden as well and have desired field node as part of the multifield. 

 

1 reply

arunpatidar
Community Advisor
Community Advisor
November 2, 2021

Hi,

Could you please share yor design dialog, how you are doing this?

try with sling:hideResource

https://experienceleague.adobe.com/docs/experience-manager-64/developing/platform/sling-resource-merger.html?lang=en

 

Arun Patidar
tushaar_srivastava
Level 6
November 2, 2021

Hi Arun,
I have updated the dialog in above question.

since I need to hide the OOB width that is a multifield and under /libs/core/wcm/components/image/v3/image/cq:design_dialog/content/items/tabs/items/properties/items/content/items/widths

I am hiding the fields under width as you can see around last line of above dialog xml

<itemsjcr:primaryType="nt:unstructured"sling:hideChildren="[resizeWidth,allowedRenditionWidths,altValueFromDAM,titleValueFromDAM,jpegQuality,allowedRenditionWidths ]">

 

Hiding the field under width using sling:hiddenChildern : allowedRenditionWidths

I tried with sling:hideResource, but didn't worked for me.

Vijayalakshmi_S
Vijayalakshmi_SAccepted solution
Level 10
November 2, 2021

Hi @tushaar_srivastava,

If you don't want the widths (multifield), then we need to mention the same and not the field under it which is allowRenditionWidths 

<itemsjcr:primaryType="nt:unstructured"sling:hideChildren="[resizeWidth,altValueFromDAM,titleValueFromDAM,jpegQuality,widths ]">

 

or if you are looking to retain the widths multifield and amend only the fields under it, then we need to have widths node overridden as well and have desired field node as part of the multifield.