I am trying to access a list of items having 'title' and 'url' in them. I want to access the 'item' or 'url' but not sure how to.
The child items are accessible but with:
${child} // prints like this {"title":"Hello","url":"www.hello.com"}
but ${child.url} or ${child['url'} doesn't print anything.
This is my html:
<div data-sly-use.model="au.com.nbnco.website.model.components.Links">
<h6>${properties.linksTitle @ context="html"}</h6>
<ul data-sly-list.child="${properties.links}">
<li> ${child.url}</li> // not printing anything
<li> ${child.['url']}</li> // not printing anything
<li> ${child}</li> // prints like this {"title":"Hello","url":"www.hello.com"}
</ul>
</div>
And this my dialog.xml.
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
jcr:primaryType="cq:Dialog"
width="640"
height="480"
xtype="dialog">
<items
jcr:primaryType="cq:Widget"
xtype="tabpanel">
<items jcr:primaryType="cq:WidgetCollection">
<configurations
jcr:primaryType="cq:Panel"
title="Configuration">
<items jcr:primaryType="cq:WidgetCollection">
<links_title
jcr:primaryType="nt:unstructured"
fieldLabel="Links Title"
name="./linksTitle"
defaultValue="Links"
xtype="textfield"/>
<links
jcr:primaryType="cq:Widget"
name="./links"
title="Links"
xtype="multifield">
<fieldConfig
jcr:primaryType="cq:Widget"
border="true"
layout="form"
padding="5px"
xtype="multi-field-panel">
<items jcr:primaryType="cq:WidgetCollection">
<title
jcr:primaryType="cq:Widget"
dName="title"
fieldLabel="Title"
xtype="textfield"/>
<url
jcr:primaryType="cq:Widget"
dName="url"
fieldLabel="Url"
xtype="textfield"/>
</items>
</fieldConfig>
</links>
</items>
</configurations>
</items>
</items>
</jcr:root>