I am trying to list all my tag names in one column. While listing them I am storing each tag's name into array tagarray. Below the list, I want to output whole array inside <p>.
<div>
<#assign tagarray = []>
<#list elements as element>
<#if element.tags??>
<#list element.tags as tag>
<#if tag.myProperty??>
<span class="section-name">${tag.text}</span>
<br />
<#assign tagarray = tagarray + ["${tag.text}"]>
</#if>
</#list>
</#if>
</#list>
<p>${tagarray}</p>
</div>
The issue is, this line of code:
<#assign tagarray = tagarray + ["${tag.text}"]>
doesn't seem to work. According to some websites the syntax above is correct, so I don't know why it is not working.