{assign var="oldYear" value=''}
{assign var="newYear" value=''}
{if !empty($item.items)}
{foreach from=$item.items item="date"}
{assign var=newYear" value=$date|date_format:'%Y'}
{if $oldYear != $newYear}
{if $oldYear != ''}
{/if}
+
{$newYear}
{else}
There are no archives
{/if}