{if $count > 0}
    <ul class="workk">
    {foreach from=$cats item=node}
        <li>
        {if $node.count > 0}
            <a href="#{$node.category_name|lower|replace:' ':'-'}_{$node.category_id}">{$node.category_name}</a>
            {else}
            <span>{$node.category_name}</span>
        {/if}
        </li>
    {/foreach}
    </ul>
{/if}