{include 'breadcrumbs'}
{if $_modx->resource.parent == 162 || $_modx->resource.parent == 163} {*если ресурс из блога или новостей*}
{$_modx->resource.publishedon | date_format : '%d.%m.%Y'}
{$_modx->runSnippet('!xLike',['tpl' => 'tplXLike'])}
{/if}
{if $_modx->config.cultureKey != $_modx->config.localizator_default_language} {set $content_lang = $_modx->resource.id | resource : ('content_'~$_modx->config.cultureKey)} {$content_lang} {else} {$_modx->resource.content} {/if}
{if $_modx->resource.parent == 162 || $_modx->resource.parent == 163} {*если ресурс из блога или новостей показываем привязанные товары*} {set $rel_items = $_modx->runSnippet( 'msProducts', [ 'tpl'=>'tplProduct', 'includeThumbs' => 'small', 'parents' => 160, 'resources' => "1,{$_modx->resource.related_products}", 'includeTVs' => 'video,pagetitle_ru,pagetitle_ua,content_ru,content_ua', 'sortby' => 'RAND()', 'depth' => 5, 'showLog' => 0, 'limit' => 20, 'showZeroPrice' => 1, ] )} {if $rel_items?}
{$_modx->lexicon('related_products')}:
    {$rel_items}
{/if} {/if} {if $_modx->resource.parent == 163} {*другие новости*} {set $other_news = $_modx->runSnippet( 'pdoResources', [ 'elementClass' => 'modSnippet', 'parents' => "{$_modx->resource.parent}", 'resources' => "-{$_modx->resource.id}", 'tpl' => 'tplNews', 'depth' => 0, 'limit' => 4, 'sortby' => 'publishedon', 'sortdir' => 'DESC', 'tvPrefix' => '', 'includeContent' => 1, 'includeTVs' => 'img,pagetitle_ru,pagetitle_ua,content_ru,content_ua' ] )} {if $other_news?}
{$_modx->lexicon('other_news_title')}
    {$other_news}
{/if} {/if} {if $_modx->resource.parent == 162} {*другие статьи*} {set $other_blog_articles = $_modx->runSnippet( 'pdoResources', [ 'elementClass' => 'modSnippet', 'parents' => "{$_modx->resource.parent}", 'resources' => "-{$_modx->resource.id}", 'tpl' => 'tplBlog', 'depth' => 0, 'limit' => 4, 'sortby' => 'publishedon', 'sortdir' => 'DESC', 'tvPrefix' => '', 'includeContent' => 1, 'includeTVs' => 'img,pagetitle_ru,pagetitle_ua,content_ru,content_ua' ] )} {if $other_blog_articles?}
{$_modx->lexicon('other_article_title')}
    {$other_blog_articles}
{/if} {/if}