我已经在tbody中创建了一个带有列表的表。它将生成许多行。但是,我必须使resource name
每行都是唯一的。有什么想法吗?
<table>
<thead>
<tr>
<td></td>
</tr>
</thead>
<tbody data-sly-list="${itemCount}">
<tr>
<td>
<div data-sly-resource="${'resourceName' @ resourceType='components/content/mycomponent'}"></div>
</td>
</tr>
</tbody>
</table>
答案 0 :(得分:1)
不知道我打算在那里做什么。看来您想生成唯一的合成资源名称。
为此,您可以使用itemList.count
或itemList.index
来具有以下值:res1
,res2
...或res0
,{{1} } ...请参见details in the HTL specification。
您可能必须使用res1
将数字连接到文本:
data-sly-set