Skip to content

Instantly share code, notes, and snippets.

@kevinweber
Last active February 21, 2023 14:44
Show Gist options
  • Select an option

  • Save kevinweber/5812f6b670d8ae8d3bfc7bd1ad204b7c to your computer and use it in GitHub Desktop.

Select an option

Save kevinweber/5812f6b670d8ae8d3bfc7bd1ad204b7c to your computer and use it in GitHub Desktop.

Revisions

  1. kevinweber revised this gist Jan 8, 2018. 1 changed file with 0 additions and 5 deletions.
    5 changes: 0 additions & 5 deletions remove-resource.xml
    Original file line number Diff line number Diff line change
    @@ -1,5 +0,0 @@
    This seems to work if "hideResource" doesn't work for some reason...

    <thumbnail
    jcr:primaryType="nt:unstructured"
    sling:removeResource="true"/>
  2. kevinweber revised this gist Jan 8, 2018. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions remove-resource.xml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    This seems to work if "hideResource" doesn't work for some reason...

    <thumbnail
    jcr:primaryType="nt:unstructured"
    sling:removeResource="true"/>
  3. kevinweber revised this gist Mar 21, 2017. 2 changed files with 17 additions and 0 deletions.
    File renamed without changes.
    17 changes: 17 additions & 0 deletions xtype-cqinclude.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    ## How to reuse existing dialog elements in other dialogs?
    https://helpx.adobe.com/experience-manager/kb/XtypeCqInclude.html

    The xtype "cqinclude" can be used to include nodes from a different dialog or JSON file: https://docs.adobe.com/docs/en/aem/6-2/develop/components/xtypes.html

    ## How to get the JSON representation of an element?
    Everything in AEM can be accessed in JSON format. For example:
    `/apps/core-project/components/content/bl16-quote/_cq_dialog.json`

    If you want to access/include something more specific:
    `/apps/core-project/components/content/bl16-quote/_cq_dialog/content/items.json`

    If you add `.infinity`, you get the selected node plus all children:
    `/apps/core-project/components/content/bl16-quote/_cq_dialog.infinity.json`

    A number gives you a certain depth of children:
    `/apps/core-project/components/content/bl16-quote/_cq_dialog.2.json`
  4. kevinweber revised this gist Jan 11, 2017. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion .md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,6 @@
    # Source: http://stackoverflow.com/questions/32622443/how-to-prevent-cqdialog-inheritance
    Official documentation: https://docs.adobe.com/docs/en/aem/6-1/develop/platform/sling-resource-merger.html#Properties

    ## Source: http://stackoverflow.com/questions/32622443/how-to-prevent-cqdialog-inheritance

    Sling Resource Merging with AEM docs can be found here. Specifically look through the docs for the resource merger properties and how you can manipulate different properties.

  5. kevinweber revised this gist Jan 11, 2017. 1 changed file with 21 additions and 0 deletions.
    21 changes: 21 additions & 0 deletions _cq_dialog.xml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    <?xml version="1.0" encoding="UTF-8"?>
    <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/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">
    <content jcr:primaryType="nt:unstructured">
    <items jcr:primaryType="nt:unstructured">
    <basic jcr:primaryType="nt:unstructured">
    <items jcr:primaryType="nt:unstructured">
    <column jcr:primaryType="nt:unstructured">
    <items jcr:primaryType="nt:unstructured">
    <toggable
    jcr:primaryType="nt:unstructured"
    sling:hideResource="true"/>
    </items>
    </column>
    </items>
    </basic>
    </items>
    </content>
    </jcr:root>
  6. kevinweber created this gist Jan 6, 2017.
    15 changes: 15 additions & 0 deletions .md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    # Source: http://stackoverflow.com/questions/32622443/how-to-prevent-cqdialog-inheritance

    Sling Resource Merging with AEM docs can be found here. Specifically look through the docs for the resource merger properties and how you can manipulate different properties.

    The resource merger provides the following properties:

    sling:hideProperties (String or String[]) Specifies the property, or list of properties, to hide. The wildcard * hides all.

    sling:hideResource (Boolean) Indicates whether the resources should be completely hidden, including its children.

    sling:hideChildren (String or String[]) Contains the child node, or list of child nodes, to hide. The properties of the node will be maintained. The wildcard * hides all.

    sling:orderBefore (String) Contains the name of the sibling node that the current node should be positioned in front of.

    These properties affect how the corresponding/original resources/properties (from /libs) are used by the overlay/override (often in /apps).