Skip to content

Instantly share code, notes, and snippets.

@poonia
Last active December 31, 2023 22:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save poonia/880714b08fb2d8c6142f3afca8e9a27b to your computer and use it in GitHub Desktop.
Save poonia/880714b08fb2d8c6142f3afca8e9a27b to your computer and use it in GitHub Desktop.
AEM Author Dialog Field Types and Examples
<imgAlignment jcr:primaryType="nt:unstructured"
name="./imgAlignment"
fieldLabel="Alignment of Image"
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"
text="Default"
value="false"
cq-msm-lockable="default"/>
<left jcr:primaryType="nt:unstructured"
name="./left"
text="Left"
value="left"
cq-msm-lockable="left"/>
<center jcr:primaryType="nt:unstructured"
name="./center"
text="Center"
value="center"
cq-msm-lockable="center"/>
<right jcr:primaryType="nt:unstructured"
name="./right"
text="Right"
value="right"
cq-msm-lockable="right"/>
</items>
</imgAlignment>
<sortingEnabled
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/checkbox"
text="Enable Sorting?"
value="true"
name="./sortingEnabled"/>
<backgroundColor jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/colorfield"
showDefaultColors="{Boolean}false"
text="Background Color"
fieldLabel="Background Color"
name="./backgroundColor"
showProperties="{Boolean}false">
<items jcr:primaryType="nt:unstructured">
<white jcr:primaryType="nt:unstructured" value="#FFFFFF"/>
<black jcr:primaryType="nt:unstructured" value="#000000"/>
<blue jcr:primaryType="nt:unstructured" value="#D8F1FF"/>
<green jcr:primaryType="nt:unstructured" value="#AECDC7"/>
</items>
</backgroundColor>
<fileupload
jcr:primaryType="nt:unstructured"
jcr:title="Files"
sling:resourceType="granite/ui/components/foundation/form/fieldset">
<items jcr:primaryType="nt:unstructured">
<file
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/fileupload"
autoStart="{Boolean}true"
cq-msm-lockable="/file"
fieldLabel="Upload Image"
mimeTypes="[image/png,image/jpeg,application/pdf]"
multiple="{Boolean}false"
name="./file"
sizeLimit="100000000"
text="Upload file"
uploadUrl="/content/dam/someurl"
uploadUrlBuilder=""/>
</items>
</fileupload>
<columnWidth
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/numberfield"
fieldLabel="Column width in Grid"
defaultValue="4"
min="1"
max="12"
step="1"
name="./columnWidth"/>
<linkPath
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/pathbrowser"
rootPath="/content/"
emptyText="Path to target page"
fieldLabel="Link Page Path"
name="./linkPath"/>
<country
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/select"
fieldLabel="Select Country"
name="./country">
<items jcr:primaryType="nt:unstructured">
<usa jcr:primaryType="nt:unstructured"
text="United States"
value="usa"/>
<canada jcr:primaryType="nt:unstructured"
text="Canada"
value="canada"/>
<india jcr:primaryType="nt:unstructured"
text="India"
value="india"/>
</items>
</country>
<description
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
text="Description Text"/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment