Проблема состояла всего лишь в одном условии снипп
Проблема состояла всего лишь в одном условии сниппета Gallery
if ($modx->getOption('checkForRequestAlbumVar',$scriptProperties,true)) {
if (!empty($_REQUEST[$albumRequestVar])) $scriptProperties['album'] = $_REQUEST[$albumRequestVar];
}
Решилась задача на этом этапе очень некрасиво, но была срочная необходимость, поэтому за грамотностью не гнался:
if ($modx->getOption('checkForRequestAlbumVar',$scriptProperties,true)) {
if($scriptProperties['album']!="") $_REQUEST[$albumRequestVar]=$scriptProperties['album'];
if (!empty($_REQUEST[$albumRequestVar])) $scriptProperties['album'] = $_REQUEST[$albumRequestVar];
}
Код чанка особо не изменился:
<div id="catalog">
<p>[[+name]]</p>
</div>
[[!Gallery? &album=`[[+id]]`]]
А для того, чтобы выводились изображения корневых альбомов, не имеющих вложенных альбомов, немного видоизменил код самой страницы:
[[!Gallery? &toPlaceholder=`gallery`]]
[[!GalleryAlbums? &toPlaceholder=`galleries`]]
[[!GalleryAlbums? &rowTpl=`galSubAlbumRowTpl` &parent=`[[+gallery.id]]` &showAll=`0` &showInactive=`1` &toPlaceholder=`subgalleries`]]
<div style="float: right">
<h2>Galleries</h2>
<ul>
[[+galleries]]
</ul>
</div>
[[!If?
&subject=`[[+subgalleries]]`
&operator=`empty`
&then=`[[+gallery]]`
&else=`[[+subgalleries]]`
]]