%TEMPLATE_MODE TEXT
# ------------------------------------------------------------
%CONTEXT
cap1 = #{'city' : 'Madrid', 'country' : 'Spain'}
cap2 = #{'city' : 'Lisboa', 'country' : 'Portugal'}
cap3 = #{'city' : 'Paris', 'country' : 'France'}
caps = {cap1, cap2, cap3}
# ------------------------------------------------------------
%INPUT
<div>[# th:each="c : ${caps}" id="this should dissapear"]
<p>[[${c['city']}]]</p>
<span>[# th:text="${c['country']}"/]</span>
[/]</div>
# ------------------------------------------------------------
%OUTPUT
<div>
<p>Madrid</p>
<span>Spain</span>
<p>Lisboa</p>
<span>Portugal</span>
<p>Paris</p>
<span>France</span>
</div>