Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting emptyText on a parsys from Sightly (AEM6)

Tags:

aem

sightly

In Sightly/AEM6, when including a parsys component, how can I set the text that says 'Drag Components Here' (cq:emptyText) to use a localised string? I have several parsys components as children of a custom component and need different text for each (e.g. Drag image components here, drag link components here).

like image 231
Alasdair McLeay Avatar asked Oct 21 '22 04:10

Alasdair McLeay


1 Answers

Unfortunately it seems to be hard coded to use a specific I18n string, in /libs/cq/gui/components/authoring/clientlibs/editor/js/model/Inspectable.js

However, I was able to override the parsys control and change the CSS classes of the newpar from new section to cq-placeholder section and then include data-emptytext="Custom text" on the same html element.

like image 101
Alasdair McLeay Avatar answered Dec 23 '22 18:12

Alasdair McLeay