LPH
Well-known member
The foreach loop needs to be comma separated. Currently, a trailing comma exists for the last category. How can this be removed?
In PHP, it might be as simple as
In PHP, it might be as simple as
rtrim($my_string,',');
but what is used in the templates?
Code:
<div class="contentRow-minor contentRow-minor--hideLinks">
<ul class="listInline listInline--bullet">
<li>{{ phrase('by_user_x', {'name': $latestpost.postAuthor}) }}</li>
<li><xf:date time="{$latestpost.postDate}" /></li>
<li>
<xf:foreach loop="$latestpost.postCategoryNames" value="$Categoryname">
{$Categoryname},
</xf:foreach>
</li>
</ul>
</div>
Last edited: