Search code examples
aemsightly

Setting emptyText on a parsys from Sightly (AEM6)


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).


Solution

  • 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.