Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Accessing String array using Sightly


Level 3

In my component, I have a "map" property of xtype multifield that contains a "title" and "path".

When a page is created with the component, the "map" is stored as a String array like: type "String[]" and the value {"title":"This is title one","path":"/foo/bar"},{"title":"This is title two","path":"/foo/bar/2"}.

I would like to display these as an unordered list using Sightly. The code below gets me each pair, but I would like to narrow down even further to each "title" and "path". 

<ul data-sly-list="${properties['map']}">

Can I accomplish this using Sightly? Something like this:

<ul data-sly-list.mapItem="${properties['map']}">
    <li>Title: ${['title']}</li>
    <li>Path: ${['path']}</li>

Thanks in advance

2 Replies


Level 10

See this Sightly example to work with Collections: 

In this example - not String[] - but a List instance - gives you an idea: 

<div data-sly-test="${wcmmode.edit && !}">
      AEM Sightly/QueryBuilder Example
AEM QueryBuilder Sightly Example:
<div data-sly-test="${}" data-sly-use.v="">
<b>Here are the QueryBuilder results that corrresponds to ${}:</b>
    <ul data-sly-list="${v.files}">




Level 3

Thanks - is there any way to do this using the JS Use API instead of Java?