{tp:ad name='ad' id='1'}
{$ad.name}
{/tp:ad}
{tp:ad name='ad' id='1'}
{if empty($ad.thumb)} {$ad.name} {else/} {$ad.name} {/if}
{/tp:ad}