158 lines
4.2 KiB
Smarty
158 lines
4.2 KiB
Smarty
|
|
{* Список записей блога *}
|
|||
|
|
<!-- Хлебные крошки /-->
|
|||
|
|
<ul class="breadcrumb">
|
|||
|
|
<li><a href="/">Главная</a></li>
|
|||
|
|
{if $article_category}
|
|||
|
|
{foreach from=$article_category->path item=cat}
|
|||
|
|
{if $cat->id == 3} <li><a href="/nashi-raboty/">{$cat->name|escape}</a></li>
|
|||
|
|
{else} <li><a href="/nashi-raboty/{$cat->url}/">{$cat->name|escape}</a></li>
|
|||
|
|
{/if}
|
|||
|
|
|
|||
|
|
|
|||
|
|
{/foreach}
|
|||
|
|
{elseif $keyword}
|
|||
|
|
<li>Поиск</li>
|
|||
|
|
{/if}
|
|||
|
|
</ul>
|
|||
|
|
<!-- Хлебные крошки #End /-->
|
|||
|
|
{if $article_category}<h1>{$article_category->name}</h1>{/if}
|
|||
|
|
|
|||
|
|
{*if in_array($article_category->id, array(3))}
|
|||
|
|
<div id="hideContactForm" class="hide">
|
|||
|
|
{include file='contact_form_inline.tpl'}
|
|||
|
|
</div>
|
|||
|
|
{/if*}
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
<!-- Тело /-->
|
|||
|
|
{images_resize content=$article_category->description}
|
|||
|
|
<!--/ Тело -->
|
|||
|
|
|
|||
|
|
{* Костыль для статей, которые как бренды *}
|
|||
|
|
{if $article_category->id == 3}
|
|||
|
|
|
|||
|
|
|
|||
|
|
{if $smarty.get.page < 2}{include file='articles_like_brands.tpl'}{/if}
|
|||
|
|
|
|||
|
|
{else}
|
|||
|
|
|
|||
|
|
{include file='articles_like_category.tpl'}
|
|||
|
|
{*if $article_category->id != 3}
|
|||
|
|
{include file='articles_like_category.tpl'}
|
|||
|
|
{/if*}
|
|||
|
|
|
|||
|
|
{/if}
|
|||
|
|
|
|||
|
|
<!-- {* Рекурсивная функция вывода дерева категорий *}
|
|||
|
|
{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} -->
|
|||
|
|
{*<h1>{$article_category->name}</h1>*}
|
|||
|
|
|
|||
|
|
<!--<div class="article_categories">
|
|||
|
|
{article_categories_tree categories=$article_category->subcategories}
|
|||
|
|
</div> -->
|
|||
|
|
|
|||
|
|
|
|||
|
|
{if $markas}
|
|||
|
|
<div class="brands row">
|
|||
|
|
{foreach from=$markas item=b key=k}
|
|||
|
|
{assign var=img value="`$config->marka_images_dir``$b->image`"}
|
|||
|
|
<div class="brand col-sm-2 col-xs-6 w12-5 {if $k > 7 && $service_filter}brand-hidden{/if}" data-style="width:12.5%">
|
|||
|
|
<div class="brand-image">
|
|||
|
|
{if $b->image}<a class="w" href="/{$config->worksUrl}/{$b->url}/">
|
|||
|
|
<img class="img-thumbnail" src="{$img|resizeImg:117:117}" alt="{$b->name}"></a>
|
|||
|
|
{/if}
|
|||
|
|
</div>
|
|||
|
|
<div class="brand-name"><a class="w" href="/{$config->worksUrl}/{$b->url}/" >{$b->name}</a></div>
|
|||
|
|
</div>
|
|||
|
|
{/foreach}
|
|||
|
|
</div>
|
|||
|
|
{if $k > 7 && $service_filter}<div class="brand-all-btn"><button class="btn btn-link" onclick="$('.brand-hidden').slideToggle()">Все марки</button></div>{/if}
|
|||
|
|
{/if}
|
|||
|
|
|
|||
|
|
|
|||
|
|
{include file='service_filter.tpl'}
|
|||
|
|
|
|||
|
|
|
|||
|
|
{if $article_category->id == 3 && $smarty.get.page < 2}
|
|||
|
|
<h2 style="margin-bottom:40px;">Все работы{if $smarty.get.page > 1} - страница {$smarty.get.page}{/if}</h2>
|
|||
|
|
{/if}
|
|||
|
|
|
|||
|
|
<div style="text-align:right">{include file='pagination_articles.tpl'}</div>
|
|||
|
|
<!-- Статьи /-->
|
|||
|
|
<div>
|
|||
|
|
<div class="blog row">
|
|||
|
|
{foreach $articles as $a}
|
|||
|
|
<div class="col-sm-3 col-xs-12">
|
|||
|
|
<div class="blog-article">
|
|||
|
|
<div class="blog-image">{if $a->image}<a href="/{$config->worksUrl}/{$a->url}/" class="w">
|
|||
|
|
<img class="img-thumbnail" src="{$a->image|resizepost:247:200}" alt="{$a->name|escape}" /></a>{/if}</div>
|
|||
|
|
<div class="blog-title"><a href="/{$config->worksUrl}/{$a->url}/">{$a->name|escape}</a></div>
|
|||
|
|
<div class="blog-annotation">{$a->annotation}</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
{/foreach}
|
|||
|
|
</div>
|
|||
|
|
<!-- Статьи #End /-->
|
|||
|
|
</div>
|
|||
|
|
<div style="text-align:right">{include file='pagination_articles.tpl'}</div>
|
|||
|
|
|
|||
|
|
{/if}
|
|||
|
|
|
|||
|
|
|
|||
|
|
{*
|
|||
|
|
|
|||
|
|
{get_last_articles var=last_articles limit=5}
|
|||
|
|
{if $last_articles}
|
|||
|
|
<div class="blog_menu">
|
|||
|
|
|
|||
|
|
{foreach $last_articles as $a}
|
|||
|
|
<li><h4><a href="/article/{$a->url}/">{$a->name|escape}</a></h4></li>
|
|||
|
|
{/foreach}
|
|||
|
|
</div>
|
|||
|
|
{/if}
|
|||
|
|
(The End) *}
|
|||
|
|
|
|||
|
|
<!-- Заголовок /-->
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
{*<h1>{if $page}{$page->name}{elseif $article_category}{$article_category->name}{else}Полезные статьи{/if}</h1>*}
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|