{extends 'template:m01Base'} {block 'main'}
{include 'm01.nav.category'}

{$_modx->resource.pagetitle}


{if !$category = $_modx->cacheManager->get('cache:category_big')} {var $ids = $.pdofetch->getChildIds('msCategory', 0, 1)} {set $category = $_modx->runSnippet('pdoResources', [ 'showLog' => 0, 'parents' => 0, 'resources' => $ids|join:',', 'depth' => 0, 'limit' => 0, 'sortby' => 'menuindex', 'sortdir' => 'asc', 'loadModels' => 'ms2gallery', 'leftJoin' => json_encode([ '210x145' => ['class' => 'msResourceFile','alias' => '210x145', 'on' => '210x145.resource_id=modResource.id AND 210x145.path LIKE "%210x145%" AND 210x145.rank=0'] ]), 'select' => json_encode([ 'modResource' => '*', '210x145' => '210x145.url as thumb' ]), 'where' => json_encode([ 'class_key' => 'msCategory', '210x145.url:!=' => '' ]) 'tpl' => '@INLINE ' ])} {do $_modx->cacheManager->set('cache:category_big', $category, 1800)} {/if}
{$category}
{/block}