Skip to content

Instantly share code, notes, and snippets.

@fredrick-dominy
Created October 21, 2017 23:25
Show Gist options
  • Select an option

  • Save fredrick-dominy/af021ff184f2cf27eda3514902d39b7b to your computer and use it in GitHub Desktop.

Select an option

Save fredrick-dominy/af021ff184f2cf27eda3514902d39b7b to your computer and use it in GitHub Desktop.
TouchUI Image Dialog
<!-- Begin Image Dialog -->
<imageVariableName jcr:primaryType="nt:unstructured"
jcr:title="Image Properties"
sling:resourceType="granite/ui/components/foundation/section">
<layout jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns"
margin="{Boolean}false"/>
<items jcr:primaryType="nt:unstructured">
<column jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/container">
<items jcr:primaryType="nt:unstructured">
<file jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/fileupload"
autoStart="{Boolean}false"
class="cq-droptarget"
fieldLabel="Add an image here."
fileNameParameter="./imageVariableName/fileName"
mimeTypes="[image]"
multiple="{Boolean}false"
name="./imageVariableName/file"
title="Upload Image Asset"
uploadUrl="${suffix.path}"
useHTML5="{Boolean}true"/>
<resType jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/hidden"
name="./imageVariableName/sling:resourceType"
value="foundation/components/image"/>
</items>
</column>
</items>
</imageVariableName>
<!-- Begin Image Dialog -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment