How to access multifield values of a design dialog in sightly

Avatar

Avatar

ybharath264

Avatar

ybharath264

ybharath264

24-09-2018

I have multifield (granite/ui/components/coral/foundation/form/multifield) in a design dialog.  And the values are being saved in the design template (/etc/designs/<myapp>/jcr:content/<mytemplate>/<mymultifield>/item[n]).

How can I access these values in my sightly template.

I was trying something like this ${currentStyle.<mymultifield>.listChildren}, but its not working

Please help.  Thanks in advance.

I am on version 6.3

View Entire Topic

Avatar

Avatar

akashs51893872

Avatar

akashs51893872

akashs51893872

25-05-2019

You can access directly from HTL

SCREENSHOT (with the name of the design multifield property I am trying to access) :

1759558_pastedImage_0.png

CODE:

<div class="container">

  <sly

          data-sly-test="${currentStyle}"

       data-sly-use.xtcontainerstyleResource="${currentStyle.path}">

    <div data-sly-test="${xtcontainerstyleResource}" class="${currentStyle.containerCSSClasses}">

      <sly data-sly-test="${xtcontainerstyleResource.hasChildren}"

           data-sly-list="${xtcontainerstyleResource.listChildren}">

        <sly data-sly-test="${item.name == 'divElements'}"

             data-sly-list="${item.listChildren}">

          <div class="${item.cssClass}">

            <sly data-sly-resource="${ item.name @ resourceType='wcm/foundation/components/responsivegrid' }"></sly>

          </div>

        </sly>

      </sly>

    </div>

  </sly>

  <sly data-sly-test="${!currentStyle}">

    <sly data-sly-resource="${ item.name @ resourceType='wcm/foundation/components/responsivegrid' }"></sly>

</div>