<{if $categories}>

	<{if $mode == 'side_tb'}>

		<ul>
			<{foreach from=$categories item="cat" name="i"}>
				<{if $cat->getInMenu()}>
					<{assign var="children" value=$cat->getChildren()}>
					<{assign var="cnt" value=$children|@count}>

					<li>
						<a href="<{$cat->getUrl()|escape}>"><{$cat->getName()|escape}> <{if $cnt}><span>(<{$cnt}>)</span><{/if}></a>
						<{include file="category_section.html" categories=$children mode="side_tb"}>
					</li>
				<{/if}>
			<{/foreach}>
		</ul>

	<{else}>

		<ul>
			<{foreach from=$categories item="cat" name="i"}>
				<{if $cat->getInMenu()}>
					<li>
						<a href="<{$cat->getUrl()|escape}>"><{$cat->getName()|escape}></a>
					</li>
				<{/if}>
			<{/foreach}>
		</ul>
	<{/if}>

<{/if}>