<ul>
  {foreach item=dir from=$dirs}
  <li{if $dir.subcount > 0} class="hassub"{/if}>
    {if $dir.subcount > 0}
    <img alt="Ordner mit Unterverzeichnissen" src="layout/images/folder-hassub.png" />
    {else}
    <img alt="" src="layout/images/folder.png" />
    {/if}
    <input type="radio"{if $dir.checked == 1} checked="checked"{/if} name="directory" id="{$dir.id}" value="{$dir.fullpath}" />
    <label for="{$dir.id}">{$dir.name}</label>
    {$dir.sub}
  </li>
  {/foreach}
</ul>