Install emptyText in parsys from Sightly (AEM6)

In Sightly / AEM6, when the parsys component is turned on, how can I set a text that says “Drag Components Here” (cq: emptyText) to use a localized string? I have several parsys components as children of a custom component and each requires a separate text (e.g. drag and drop image components here, drag link components here).

+4
source share
3 answers

Unfortunately, it seems that it is hardcoded to use a specific I18n line, in /libs/cq/gui/components/authoring/clientlibs/editor/js/model/Inspectable.js

, parsys CSS newpar new section cq-placeholder section, data-emptytext="Custom text" html.

+1

CQ5.6 , , AEM 6:

  • /libs/foundation/components/parsys
  • node, "" node, sling: resourceType //parsys/new /libs/foundation/components/parsys/new
  • cq: emptyText node, .
+1

See the following code:

<div id="myTabContent" class="tab-content" data-sly-list="${properties.titles}"> 
    <div data-sly-test.resourcePath1="${'{0}{1}' @ format=['tab',itemList.index]}" class="${itemList.index != 0 && wcmmode.isPreview ? 'tab-pane fade' : 'tab-pane fade in active'}" id="${item}">

        <div data-sly-resource="${ resourcePath1 @ resourceType='wcm/foundation/components/parsys/newpar'}" class="cq-placeholder section" data-emptytext="${item} content"></div>

</div>
0
source

All Articles