Skip to content

Instantly share code, notes, and snippets.

View Surajkamdi's full-sized avatar
:octocat:
Tracking You...

Suraj Kamdi Surajkamdi

:octocat:
Tracking You...
View GitHub Profile
@Surajkamdi
Surajkamdi / React Join Children
Created March 4, 2020 05:08 — forked from granmoe/ React Join Children
Ever wanted to join react children like you join an array?
This file is only here to provide the title of the gist
@Surajkamdi
Surajkamdi / Sightly Pattern "Inline List"
Created September 19, 2018 09:50 — forked from kevinweber/Sightly Pattern "Inline List"
AEM/HTL: Define a list/array within a HTL template (and avoid redundant code!)
<!--/* We can define a list within a Sightly template to avoid redundant code */-->
<sly data-sly-test.versions="${['desktop', 'mobile']}"/>
<sly data-sly-list.identifier="${versions}">
<div class="element ${identifier}">Repeated content</div>
</sly>
@Surajkamdi
Surajkamdi / component.html
Created September 19, 2018 09:50 — forked from kevinweber/component.html
HTL/Sightly: "Use and call template" pattern. Put template into separate file for reusability, and pass parameters when calling it. Note that in most cases it's not necessary to pass "properties" to the template because they work even if they're not passed explicitly.
<sly data-sly-use.component="template.html"
data-sly-call="${component.template @ properties=properties}" />
@Surajkamdi
Surajkamdi / .content.xml
Created September 19, 2018 09:49 — forked from kevinweber/.content.xml
AEM: Add JavaScript (including events) to AEM loaded on editor.html. Solution: Create clientlib with category "cq.authoring.dialog". Exemplary usage: Reload page if layer changes.
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="cq:ClientLibraryFolder"
categories="[cq.authoring.dialog]"/>
@Surajkamdi
Surajkamdi / _cq_dialog.xml
Created September 19, 2018 09:49 — forked from kevinweber/_cq_dialog.xml
AEM: Sling Resource Merging & Includes (dialog, inheriting properties)
<?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">
@Surajkamdi
Surajkamdi / example.html
Created September 19, 2018 09:47 — forked from kevinweber/example.html
AEM: Include another resource + modify tag and class name #data-sly-resource
<!--/* More: https://docs.adobe.com/docs/en/htl/docs/block-statements.html#resource */-->
<!--/* By default, the AEM decoration tags are disabled, the decorationTagName option allows to bring them back, and the cssClassName to add classes to that element. */-->
<div data-sly-resource="${'headline' @
resourceType='about-project/components/content/c34-section-headline',
decorationTagName='span',
cssClassName='className'
}"></div>
<!--/* More about the decoration tag: https://docs.adobe.com/docs/en/aem/6-3/develop/components/decoration-tag.html */-->
@Surajkamdi
Surajkamdi / built-in-tools.md
Created September 19, 2018 09:47 — forked from kevinweber/built-in-tools.md
Collection of AEM Links, Commands & Tips / Cheat Sheet

Web Consoles & Tools

<alignment jcr:primaryType="nt:unstructured"
name="./alignChildren"
fieldLabel="Alignment of components"
required="{Boolean}true"
selectionMode="single"
sling:resourceType="granite/ui/components/coral/foundation/form/buttongroup">
<items jcr:primaryType="nt:unstructured">
<default jcr:primaryType="nt:unstructured"
name="./default"