Problem Statement: In AEM, we always try to make dialogs user friendly as much as we can, and sometimes we give instructions to authors by giving fieldDescription corresponding to every field. But the problem with fieldDescription is author always needs to hover on the tooltip to read the instruction.
I was always looking for something better so that the author can directly open the dialog
and can see what he/she supposed to enter in the fields.
So Here, a note resourceType came for rescue.This resourceType is available
here: /libs/cq/gui/components/authoring/dialog/note
How to use this:
Make a node with these below properties:
jcr:primaryType : nt:unstructured
sling:resourceType:cq/gui/components/authoring/dialog/note
note: “Any note for Authors”
Dialog After Adding note resourceType
Extended Problem Solving: But I was trying to make an additional thing with this note. I want to provide a hyperlink in the dialog also. So this is also very easy to do. You can overlay or override this note resourceType and change the note.jsp line number 32.
<h4 class="coral-Heading coral-Heading--4"><%=outVar(xssAPI, i18n, note) %></h4>
to
<h4 class="coral-Heading coral-Heading--4"><%=note %></h4>
After that, you can add hyperlinks also in the dialogs by writing html also.
No comments:
Post a Comment
If you have any doubts or questions, please let us know.