{if count($aGroups) > 0}

{foreach from=$aGroups item=aItem name=grplinks} {$aItem.title|clean|escape}{if not $smarty.foreach.grplinks.last}, {/if} {if $smarty.foreach.grplinks.last}

[ {language text="view_all_my_groups"} ]
{/if} {foreachelse}
{language text="there_are_no_groups_yet"}
{/foreach}

{/if}