{include 'file:idea_base/breadcrumbs.tpl'}
{if !$query} {include 'file:idea_base/heading.tpl' $use_sf=true} {insert 'file:idea_blocks/idea_category_items.tpl'} {/if} {'!printPlaceholders' | snippet}
{if $query} {include 'file:idea_base/heading.tpl' $title='Результаты поиска'} {else} {insert 'file:idea_blocks/idea_category_top.tpl'} {insert 'file:idea_blocks/idea_category_populars.tpl'} {/if} {insert 'file:idea_blocks/idea_category_sort.tpl'}
{insert 'file:idea_blocks/idea_category_products.tpl'}
{*if count($.get)>1} {if $.get['page']>1}{else} {include 'file:idea_blocks/idea_category_vendors.tpl'} {/if} {else} {include 'file:idea_blocks/idea_category_vendors.tpl'} {/if*}
{var $videos = $_modx->resource['videos'] | fromJSON} {*var $content = ''*} {*var $sf_content = 'sf.content' | placeholder*} {*if $sf_content} {set $content = $sf_content} {else} {set $content = $_modx->resource['content_html']} {/if*} {if $_modx->resource.content?} {set $content = $_modx->resource.content} {else} {set $content = $_modx->resource['content_html']} {/if} {if $_modx->getPlaceholder('sf.title')?} {set $content = $_modx->getPlaceholder('sf.content')} {/if} {var $category_desc}
{if $content}
{$content}
{/if} {if $videos}

Видео

{foreach $videos as $item} {/foreach}
{/if}
{set $reviews_cofig = [ '-noAjax' => true, 'ajax' => 1, 'ajaxMode' => 'button', 'element' => 'pdoResources', 'limit' => 6, 'class' => 'ecMessage', 'loadModels' => 'easycomm', 'leftJoin' => [ 'Thread' => [ 'class' => 'ecThread', 'alias' => 'Thread', ], 'Resource' => [ 'class' => 'modResource', 'alias' => 'Resource', 'on' => 'Thread.resource = Resource.id' ], 'ProductData' => [ 'alias' => 'ProductData', 'class' => 'msProductData', 'on' => 'Resource.id = ProductData.id' ], 'Small' => [ 'alias' => 'Small', 'class' => 'msProductFile', 'on' => 'Resource.id = Small.product_id AND Small.path LIKE "%/small/%" AND Small.rank = 0' ] ], 'select' => [ 'Resource.id as product_id', 'Resource.pagetitle as product_title', 'Resource.uri as product_uri', 'Small.url as product_thumb', 'ecMessage.user_name as username', 'ecMessage.date as date', 'ecMessage.text as text', 'ecMessage.rating as rating', 'ecMessage.isYandex as isYandex', ], 'where' => [ 'ecMessage.published' => true, ], 'groupby' => 'ecMessage.id', 'sortby' => 'ecMessage.createdon', 'sortdir' => 'DESC', 'setTotal' => true, '-totalVar' => 'total', '-toPlaceholder' => 'resultsRevs', 'tpl' => '@FILE idea_chunks/reviews/reviews_tile.tpl', 'tplWrapper' => '@INLINE {$output}', 'showLog' => false, 'pageVarKey' => 'pageRevs', 'totalVar' => 'pageRevs.total', 'pageNavVar' => 'pageRevs.nav', 'pageCountVar' => 'pageRevsCount', 'setMeta' => '0', 'ajaxElemWrapper' => '#pdopageRevs', 'ajaxElemRows' => '#pdopageRevs .rows', 'ajaxElemPagination' => '#pdopageRevs .pagination', 'ajaxElemLink' => '#pdopageRevs .pagination a', 'ajaxElemMore' => '#pdopageRevs .btn-more', 'ajaxTplMore' => '@INLINE ' ]} {var $child_ids = '!pdoResources' | snippet : [ 'pageVarKey' => 'pageChilds', 'parents' => $_modx->resource.id, 'where' => [ 'class_key' => 'msCategory', ], 'limit' => 0, 'returnIds' => true, ]} {set $child_ids = $child_ids | split : ','} {if $child_ids} {set $child_ids[] = $_modx->resource.id} {set $reviews_cofig['where']['Resource.parent:IN'] = $child_ids} {/if} {set $revs = '!pdoPage' | snippet : $reviews_cofig} {if $revs?}

Популярные отзывы

{$revs}

{'pageRevs.nav' | placeholder}

{/if} {/var} {if count($.get)>1} {if $.get['page']>1} {else} {$category_desc} {/if} {else} {$category_desc} {/if}
{*Микроразметка

{'pagetitle' | resource}

*} {/block}