AEM 6.1 Sightly Initial Display Then Hide | Community
Skip to main content
November 25, 2015
Solved

AEM 6.1 Sightly Initial Display Then Hide

  • November 25, 2015
  • 4 replies
  • 1161 views

Hello I am new to AEM, and Sightly. I have a questions regarding, Sightly and AEM.

So I have created a component that display data based on the 2 inputs, when I drag-and-drop the component to the page I am looking for initial TEXT to appear and then when I double click and edit the component that text will disappear.

Thank you ahead of time,

-T

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by leeasling

You can check to see if a property exists and display default text if it does not.

<h1>${properties.text ? properties.text : 'Use Dialog to Enter Text'}</h1>

Edit:

This can actually be achieved with less code.

<h1>${properties.text || 'Use Dialog to Enter Text'}</h1>

4 replies

leeaslingAccepted solution
Level 8
November 25, 2015

You can check to see if a property exists and display default text if it does not.

<h1>${properties.text ? properties.text : 'Use Dialog to Enter Text'}</h1>

Edit:

This can actually be achieved with less code.

<h1>${properties.text || 'Use Dialog to Enter Text'}</h1>
edubey
Level 10
November 25, 2015

Hi Tony,

I presume you are looking for default or initial text in dialog box textfield. You can use emptyText

Documentation

tmamAuthor
November 25, 2015

I have used emptyText and defautlValue and nothing worked. The above comment from leeasling, worked perfectly.

tmamAuthor
November 25, 2015

leeasling wrote...

You can check to see if a property exists and display default text if it does not.

  1. <h1>${properties.text ? properties.text : 'Use Dialog to Enter Text'}</h1>

 

 

Worked perfectly. Thank you a quick response.