{* шаблон вывода блоков *} {section name=b loop=$binfo} {if $binfo[b].products_list > 0 || !$binfo[b].custom} {if ($binfo[b].url ne "product_related.tpl.html" || count($product_related) > 0) && ($binfo[b].url ne "last_items_view.tpl.html" || count($last_view_products) > 0)}
{if $isadmin eq "yes" && $binfo[b].title ne ""} {/if} {* формирование заголовка блока *} {if $binfo[b].title|@strpos:"!" !== 0} {assign var="postheader" value=$binfo[b].title} {else} {assign var="postheader" value=""} {/if} {* вывод заголовка блока *} {if $binfo[b].url eq "news_center.tpl.html" || $binfo[b].url eq "new_news_center.tpl.html"} {assign var="link" value="{$smarty.const.ALL_NEWS}"} {elseif $binfo[b].url eq "articles_center.tpl.html" || $binfo[b].url eq "new_articles_center.tpl.html"} {assign var="link" value="{$smarty.const.STRING_ALL_ARTICLES}"} {else} {assign var="link" value=""} {/if}
{if $binfo[b].show_title}{include file="header_blocks.tpl.html" header=$postheader link=$link nopad=$nopad}{/if} {* вывод содержания блока *}
{if $binfo[b].type == 'html'} {include file="blocks/{$binfo[b].url}" blocknum=$smarty.section.b.index} {elseif $binfo[b].type == 'slider'} {include file="blocks/slider/{$binfo[b].url}" slider=$binfo[b] blocknum=$smarty.section.b.index} {elseif $binfo[b].type == 'custom'} {include file="blocks/custom/{$binfo[b].url}" products_list=$binfo[b].products_list blocknum=$smarty.section.b.index} {else} {$binfo[b].content} {/if}
{/if} {/if} {/section}