{'!pdoMenu'|snippet:[
'parents' => '151,3,4',
'level' => 1,
'displayStart' => 1
]}
{'!pdoMenu'|snippet:[
'parents' => '0',
'level' => 1,
'resources' => '229,5,6,148'
]}
'resources' => '-151,-3,-4'
. И тогда, если создать новую страницу в корне сайта, то она автоматически появиться в правом меню. [[pdoResources?
&tpl=`some_tpl`
&limit=`0`
&parents=`55`
&resources=`-[[#[[*id]].parent]]`
&sortby=`{"menuindex": "ASC"}`
&tplWrapper=`@INLINE
<div class="some_block">
<p class="block_heading">Какой-то заголовок</p>
<div class="block_items">
[[+output]]
</div>
</div>
`
]]
{var $resources = $_modx->getResources(
['published' => 1, 'deleted' => 0],
['sortby' => 'id', 'sortdir' => 'ASC', 'limit' => 50]
)}
{foreach $resources as $resource}
{$_modx->getChunk('@INLINE <p>{$id} {$pagetitle}</p>', $resource)}
{/foreach}
<link rel="canonical" href="[[++site_url]][[*id:ne=`[[++site_start]]`:then=`[[~[[*id]]]]`]]">
[[+new:isnot=``:then=`
<img src="{$file['medium']}" alt="{$file['description']}" title="{$file['name']}" class="item new">
`:else=`
[[+old_price:isnot=``:then=`
<img src="{$file['medium']}" alt="{$file['description']}" title="{$file['name']}" class="item sale">
`:else=`
<img src="{$file['medium']}" alt="{$file['description']}" title="{$file['name']}" class="item">
`]]
`]]
<img src="{$file['medium']}" alt="{$file['description']}" title="{$file['name']}" class="item[[+new:isnot=``:then=` new`:else=`[[+old_price:notempty=` sale`]]`]]">