@ format in sightly working differently in AEM 6.1 and AEM 6.3 | Community
Skip to main content
premchandr61956
Level 2
Jan 11, 2018 11:17 AM UTC

@ format in sightly working differently in AEM 6.1 and AEM 6.3

Hi,

We have a component where for creating multiple tabs on the page which has code snippet as below.

<div data-sly-resource="${tab.token @ format=[itemList.index], resourceType='foundation/components/parsys'}"></div>

The "tab.token" will be a value that we give in the component dialog as tab name, for example, tab1 and tab2. The above code appends an index 0,1 and so on for each node created in AEM 6.3 but doesn't add the index in AEM 6.1.

This issue is reproducible in AEM 6.3 SP1 CFP1.

Thanks,

Prem

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

8 replies

New Participant
Feb 8, 2018 2:49 PM UTC

<sly data-sly-test.parResource="${'par{0}' @format=[itemList.index]}"></sly>

This is working fine in AEM 6.3 SP1-CFP2

Thanks.

Abhishek

Translate
edubey
Level 10
Jan 11, 2018 1:22 PM UTC

Two questions:

1. What you want expected output to be.

2. You are seeing in issue in 6.3 or 6.1 ( I am not clear on last statement "The above code appends an index 0,1 and so on for each node created in AEM 6.3 but doesn't add the index in AEM 6.1.")

Translate
premchandr61956
Level 2
Jan 11, 2018 1:41 PM UTC

Yes the above code doesn't add index values to node in 6.3 but nor in 6.1

Translate
smacdonald2008
Level 10
Jan 11, 2018 1:43 PM UTC

What output are you trying to do. Typically, a collection when working with HTL is built in a WCMUse POJO or Sling Model Java class and then displayed in HTL.

Translate
smacdonald2008
Level 10
Jan 11, 2018 1:19 PM UTC

First - for syntax issues with HTL - check with the HTL Spec here -- htl-spec/SPECIFICATION.md at master · Adobe-Marketing-Cloud/htl-spec · GitHub

Are you trying to build a multi-tab component in the web page with HTL?

Translate