Decleration
{if $patientId} Add {else} Add {/if}
{assign var=m value=1} {foreach $showElems as $single} {if $patientId} {else} {/if} {capture assign=m}{$m+1}{/capture} {/foreach}
No Name Edit Delete
{$m} {$single.title} Edit Edit Delete