Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

data-emptytext AEM logic

Avatar

Level 2

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>
1 Accepted Solution

Avatar

Correct answer by
Employee

Thanks, here you can compare your components against:

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

View solution in original post

4 Replies

Avatar

Employee

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

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

Avatar

Level 2

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

I'll correct the topic title/description now.

Avatar

Correct answer by
Employee

Thanks, here you can compare your components against:

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

Avatar

Level 2

Thanks Feike,

it makes sense now. Very helpful.