@ format in sightly working differently in AEM 6.1 and AEM 6.3 | Community
Skip to main content
premchandr61956
Level 2
January 11, 2018

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

  • January 11, 2018
  • 3 replies
  • 7353 views

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.

3 replies

smacdonald2008
Level 10
January 11, 2018

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?

edubey
Level 10
January 11, 2018

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

premchandr61956
Level 2
January 11, 2018

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

smacdonald2008
Level 10
January 11, 2018

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.

February 8, 2018

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

This is working fine in AEM 6.3 SP1-CFP2

Thanks.

Abhishek