{* Calculate title from path *}
{capture name="title"}
{if count($path) > 1} - {/if}
{foreach from=$path item=category name=path}
{if $smarty.foreach.path.iteration gt 2}
>
{/if}
{if not $smarty.foreach.path.first}
{$category.TITLE}
{/if}
{/foreach}
{/capture}
{strip}
{if $title_prefix}
{assign var="in_page_title" value=$title_prefix|cat:$category.TITLE}
{else}
{assign var="in_page_title" value=$category.TITLE}
{/if}
{assign var="description" value=$category.DESCRIPTION}
{include file="header.tpl"}
{include file="top_bar.tpl"}
{* Calculate the number of categories per row *}
{php}
$this->assign('cats_per_col', ceil(count($this->get_template_vars('categs')) / CATS_PER_ROW));
{/php}
{if $cats_per_col > 15}
{php}
$this->assign('cats_per_col', ceil(count($this->get_template_vars('categs')) / (CATS_PER_ROW + 1)));
{/php}
{/if}
{* Categories *}
{if !empty($categs)}
{foreach from=$categs item=cat name=categs}
{if ($smarty.foreach.categs.iteration mod $cats_per_col eq 1 and $cats_per_col gt 1) or $smarty.foreach.categs.first}{/if}
{$cat.TITLE|escape}{if $smarty.const.CATS_COUNT} ({$cat.COUNT}){/if}
{* Display subcategories *}
{if !empty($cat.SUBCATS)}
{foreach from=$cat.SUBCATS item=scat name=scategs}
{$scat.TITLE|escape}, {/foreach} ...
{/if}
{if ($smarty.foreach.categs.iteration mod $cats_per_col eq 0 and $cats_per_col gt 1) or $smarty.foreach.categs.last} | {/if}
{/foreach}
|
|
{/if}
{if $smarty.const.FTR_ENABLE == 1 and isset($feat_links) and !empty($feat_links)}
 |
|
 |
|
{foreach from=$feat_links item=link name=links}
{include file="flink.tpl" link=$link}
{/foreach}
|
|
|
{/if}
{if $category.ID gt 0 or $qu}
{include file="googlead.tpl"}
{/if}
{* Links heading and sorting*}
{if ($qu or $category.ID gt 0 or $p) and isset($links) and !empty($links)}
 |
|
{if not $p}
|
{l}Sort by{/l}:
{if $smarty.const.ENABLE_PAGERANK and $smarty.const.SHOW_PAGERANK}{if $sort eq 'P'} {l}PageRank{/l}{else} {l}PageRank{/l}{/if} |{/if}
{if $sort eq 'H'} {l}Hits{/l}{else} {l}Hits{/l}{/if}
{if $sort eq 'A'} | {l}Alphabetical{/l}{else} | {l}Alphabetical{/l}{/if}
|
|
{/if}
 |
|
{foreach from=$links item=link name=links}
{include file="link.tpl" link=$link}
{/foreach}
|
|
|
{/if}
{* Javascript for tracking link clicks *}
{include file="footer.tpl"}
{/strip}