add public design files
This commit is contained in:
30
design/carheart/html/articles.tpl.txt
Normal file
30
design/carheart/html/articles.tpl.txt
Normal file
@@ -0,0 +1,30 @@
|
||||
{* Рекурсивная функция вывода дерева категорий *}
|
||||
{function name=article_categories_tree}
|
||||
{if $categories}
|
||||
<ul>
|
||||
{foreach $categories as $c}
|
||||
{* Показываем только видимые категории *}
|
||||
{if $c->visible}
|
||||
<li>
|
||||
<a {if $category->id == $c->id}class="selected"{/if} href="/articles/{$c->url}/">{$c->name}</a>
|
||||
{article_categories_tree categories=$c->subcategories}
|
||||
</li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
{/function}
|
||||
|
||||
|
||||
{if !$article_category}
|
||||
{get_article_categories var=article_categories}
|
||||
<div class="article_categories">
|
||||
{article_categories_tree categories=$article_categories}
|
||||
</div>
|
||||
{else}
|
||||
|
||||
{if $article_category && ($article_category->parent_id == 5 )}<h1>{$article_category->name}</h1>{/if}
|
||||
|
||||
<div class="article_categories">
|
||||
{article_categories_tree categories=$article_category->subcategories}
|
||||
</div>
|
||||
Reference in New Issue
Block a user