data-emptytext AEM logic | Community
Skip to main content
alexshel
Level 3
September 10, 2016
Solved

data-emptytext AEM logic

  • September 10, 2016
  • 4 replies
  • 4348 views

Does anyone know where to find any documentation of how the data-emptytext <div> tag attribute works in detail ? What tells whether some content has been added to a component or not to display data-emptytext value as a text message?

I've tried to Google for it, but no info available. Even docs.adobe.com has nothing.

The problem is that data-emptytext="Some Component Name" does not work on my component that generates a simple HTML code when some data has been entered (via Edit Dialog). How does the system understand that some data has been populated to the component to not show the "emptytext" value ?

Example of the first component renderer string:

<div data-sly-test.author="${wcmmode.edit || wcmmode.design}" class="cq-placeholder section" data-emptytext="Some Component Name"></div>
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 Feike_Visser1

Thanks, here you can compare your components against:

/libs/wcm/foundation/components/text/text.html

4 replies

Feike_Visser1
Adobe Employee
Adobe Employee
September 10, 2016

Only attributes with data-sly are parsed/read by Sightly/HTL.

In your case data-emptytext is just considered HTML text.

alexshel
alexshelAuthor
Level 3
September 19, 2016

Thanks Feike for clarification. The issue is not resolved though.

I'll correct the topic title/description now.

Feike_Visser1
Adobe Employee
Feike_Visser1Adobe EmployeeAccepted solution
Adobe Employee
September 19, 2016

Thanks, here you can compare your components against:

/libs/wcm/foundation/components/text/text.html

alexshel
alexshelAuthor
Level 3
September 21, 2016

Thanks Feike,

it makes sense now. Very helpful.