We have a requirement where in we have to show a default image once a dialog is opened. Then we can select the image we need. The image resourcetype is fileupload. can someone help ?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @sirishap9577191 ,
Hi @sirishap9577191 ,
Example structure in CRXDE:
/apps/my-project/components/content/my-component
└── cq:template (nt:unstructured)
└── fileReference (String) = /content/dam/my-project/default-image.jpg
Example dialog.xml
:
<image
jcr:primaryType="nt:unstructured"
sling:resourceType="cq/gui/components/authoring/dialog/fileupload"
allowUpload="{Boolean}false"
autoStart="{Boolean}false"
class="cq-droptarget"
fieldDescription="Browse an Image"
fieldLabel="Image"
fileNameParameter="./fileName" fileReferenceParameter="./fileReference"
mimeTypes="[image]"
multiple="{Boolean}false"
name="./file"
title="Upload Image Asset"
uploadUrl="${suffix.path}"
useHTML5="{Boolean}true"/>
cq:template works . Thanks everyone
Views
Likes
Replies
Views
Likes
Replies