Jump to content

Проблема с меню

Recommended Posts

Ребят, у меня проблема с меню.Никак не могу вывести дерево категорий. Выводит вот что:

А хотелось бы вот так примерно...

Вот листинг:

<!-- Меню каталога -->			<div id="catalog_menu">								{* Рекурсивная функция вывода дерева категорий *}			{function name=categories_tree}			{if $categories}			<ul>			{foreach $categories as $c}				{* Показываем только видимые категории *}				{if $c->visible}				 					<li>						{if $c->image}<img src="{$config->categories_images_dir}{$c->image}" alt="{$c->name}">{/if}						<a  {if $category->id == $c->id}{/if} href="../catalog/{$c->url}" data-category="{$c->id}" class="leftnav" >{$c->name}</a>											</li>				{categories_tree categories=$c->subcategories}				{/if}			{/foreach}			</ul>			{/if}			{/function}						{categories_tree categories=$categories}			</div>			<!-- Меню каталога (The End)-->
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...