{include 'breadcrumbs'}
{if $_modx->resource.parent == 162 || $_modx->resource.parent == 163} {*если ресурс из блога или новостей*}
{if $authors?}
{$authors}
{/if}
{$time_read_article}
{$_modx->resource.publishedon | date_format : '%d.%m.%Y'}
{$_modx->resource.editedon | date_format:"%d.%m.%Y" }
{*$_modx->lexicon('article_views')*} {$_modx->runSnippet('!siteStatistics',['resource' => "{$_modx->resource.id}"])}
{*$_modx->runSnippet('!xLike',['tpl' => 'tplXLike'])*} {*$_modx->runSnippet('!SimpleRating',['tpl' => 'tplSimpleRatingPage'])*}
{/if}
{$content}
{if $_modx->resource.parent == 162 || $_modx->resource.parent == 163} {*если ресурс из блога или новостей*}
{if $authors?}
{/if} {$_modx->runSnippet('!SimpleRating',['tpl' => 'tplSimpleRatingPage'])}
{/if}
{include 'faq'} {if $_modx->resource.parent == 162 || $_modx->resource.parent == 163}
{$_modx->lexicon('item_review')} {$ticketcount == ''? '': $ticketcount}
{$_modx->runSnippet( '!TicketComments', [ 'allowGuest' => '1', 'tplComments' => 'tplTicketsCommentWrapperItem', 'tplCommentFormGuest' => 'tplTicketsCommentFormSite', 'tplCommentForm' => 'tplTicketsCommentFormLogin', 'tplCommentAuth' => 'tplTicketsCommentOneAuthSite', 'formBefore' => 0, 'autoPublish' => 0, 'autoPublishGuest' => 0, 'enableCaptcha' => 0 ] )}
{/if} {if $_modx->resource.parent == 162 || $_modx->resource.parent == 163} {*если ресурс из блога или новостей показываем привязанные товары*} {if $_modx->config.cultureKey != 'ua'} {set $rel_items = $_modx->runSnippet( 'msProducts', [ 'tpl'=>'tplProduct', 'includeThumbs' => 'small,small_mobile', 'parents' => 160, 'resources' => "1,{$_modx->resource.related_products}", 'includeTVs' => 'video', 'sortby' => 'RAND()', 'depth' => 5, 'showLog' => 0, 'limit' => 20, 'showZeroPrice' => 1, 'leftJoin' => '{"localizator" : {"class" : "localizatorContent","alias" : "localizator","on" : "localizator.resource_id = msProduct.id"}}', 'select' => '{ "localizator" : "msProduct.*, localizator.*, msProduct.id" }', 'where' => '{ "localizator.key" : "' ~ ('localizator_key' | option) ~ '"}', ] )} {else} {set $rel_items = $_modx->runSnippet( 'msProducts', [ 'tpl'=>'tplProduct', 'includeThumbs' => 'small,small_mobile', 'parents' => 160, 'resources' => "1,{$_modx->resource.related_products}", 'includeTVs' => 'video', 'sortby' => 'RAND()', 'depth' => 5, 'showLog' => 0, 'limit' => 20, 'showZeroPrice' => 1, ] )} {/if} {if $rel_items?}
{$_modx->lexicon('related_products')}:
    {$rel_items}
{/if} {/if} {if $_modx->resource.parent == 163} {*другие новости*} {if $_modx->config.cultureKey != 'ua'} {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, 'leftJoin' => '{"localizator" : {"class" : "localizatorContent","alias" : "localizator","on" : "localizator.resource_id = modResource.id"}}', 'select' => '{"localizator" : "modResource.*, localizator.*, modResource.id"}', 'where' => '{"localizator.key" : "'~ ('localizator_key' | option) ~'"}', ] )} {else} {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' ] )} {/if} {if $other_news?}
{$_modx->lexicon('other_news_title')}
    {$other_news}
{/if} {/if} {if $_modx->resource.parent == 162} {*другие статьи*} {if $_modx->config.cultureKey != 'ua'} {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', 'leftJoin' => '{"localizator" : {"class" : "localizatorContent","alias" : "localizator","on" : "localizator.resource_id = modResource.id"}}', 'select' => '{"localizator" : "modResource.*, localizator.*, modResource.id"}', 'where' => '{"localizator.key" : "'~ ('localizator_key' | option) ~'"}', ] )} {else} {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' ] )} {/if} {if $other_blog_articles?}
{$_modx->lexicon('other_article_title')}
    {$other_blog_articles}
{/if} {/if}