Location: PHPKode > projects > Blandware AtLeap Lite - CMS on PHP > atleaplite/smarty/templates/category_menu_section.tpl
{* Smarty template *}
<ul{if $categoryMenuFirstLevel} id="categoryMenu"{else} class="subMenu"{/if}>
{assign var='categoryMenuFirstLevel' value=false}
{foreach from=$categories item=category}
    {assign var='categories' value=$category->getSubCategories()}
    {count assign='categoriesNumber' array=$categories}
    {assign var='commodities' value=$category->getCommodities()}
    {count assign='commoditiesNumber' array=$commodities}
    {assign var='isRoot' value=false}
    {if $category->parent_id === null}
        {assign var='isRoot' value=true}
    {/if}
    {assign var='hasContent' value=false}
    {if $categoriesNumber > 0 || $commoditiesNumber > 0}
        {assign var='hasContent' value=true}
    {/if}
    <li>
        <span class="{if $isRoot}categoryTitle{else}categoryTitleDefaultCursor{/if}">
            {if !$isRoot && $hasContent}
            <a href="{buildUrl id=$category->id friendly='category'}">
            {/if}
            {$category->title|escape}
            {if !$isRoot && $hasContent}
            </a>
            {/if}
        </span>
        {if $category->parent_id === null}
        <div class="categoryTree">
            {include file="category_menu_section.tpl"}
        </div>
        {/if}
    </li>
{/foreach}
</ul>
Return current item: Blandware AtLeap Lite - CMS on PHP