Location: PHPKode > projects > Blandware AtLeap Lite - CMS on PHP > atleaplite/smarty/templates/category/show.tpl
{* Smarty template *}
{assign var='isRoot' value=false}
{if $category == null}{assign var='isRoot' value=true}{/if}

{if $ancestorsNumber > 0}
    {message assign=prev key='breadCrumbs.top'}
    {foreach from=$ancestors item=ancestor name=ancestors}
        {if !$smarty.foreach.ancestors.first}/{/if}
        <a href="{buildUrl id=$ancestor->parent_id friendly='category'}" id="size11">{$prev|escape}</a>
        {assign var=prev value=$ancestor->title}
    {/foreach}
    /
    <a href="{buildUrl id=$category->id friendly='category'}" id="size11">{$prev|escape}</a>
{/if}

{if !$isRoot}
    {$category->description}
{/if}


<ul>
    {foreach from=$subCategories item=subCategory}
        {assign var='subsubCategories' value=$subCategory->getSubCategories()}
        {count assign='subsubCategoriesNumber' array=$subsubCategories}
        {assign var='subCommodities' value=$subCategory->getCommodities()}
        {count assign='subCommoditiesNumber' array=$subCommodities}
      	<li>
            {if $subsubCategoriesNumber > 0 || $subCommoditiesNumber > 0}
            <a href="{buildUrl id=$subCategory->id friendly='category'}">
            {/if}
                <strong>{$subCategory->title|escape}</strong>
            {if $subsubCategoriesNumber > 0 || $subCommoditiesNumber > 0}
            </a>
            {/if}
            </li>
    {/foreach}
</ul>


<table class="tableView">
    {foreach from=$commodities item=commodity}
        <tr>
            <td>
                <a href="{buildUrl id=$commodity->id friendly='commodity'}">{$commodity->title|escape}</a>
            </td>
            <td>
                {if $commodity->hasImage()}
                    <img src="image.php?id={$commodity->image_id}&size=thumbnail&rnd={random}">
                {/if}
            </td>
        </tr>
    {/foreach}
</table>



{assign var='isRoot' value=false}
{if $category == null}{assign var='isRoot' value=true}{/if}
{if !$isRoot}
    {buildUrl assign='buttonUrl' id=$category->parent_id friendly='category'}
    <br>
    <a href="{$buttonUrl}">{message key='common.button.back'}</a>
{/if}

Return current item: Blandware AtLeap Lite - CMS on PHP