我正在使用Liferay 6.2 EE。我想通过执行以下代码片段来检索freemarker Webcontent-Template中我的列表元素的索引:
<#list cross_sellings_header.crossSellingsTile.getSiblings() as cross_selling>
${cross_selling?index}
.... <#-- some implementation -->
</#list>
但是我收到一条错误消息:
Error on line 214, column 42, in template 20155#20195#ESHOP ARTIKEL
Found index, expecting one of: chunk, is_date, is_hash, float, matches, time, number_to_datetime, byte, substring, is_transform, web_safe, iso_ms_nz, groups, seq_contains, iso, is_method, eval, iso_ms, iso_utc_m_nz, parent, capitalize, number, if_exists, is_directive
我也试过index_of
但没有成功......