Пример leftJoin в pdoResources. Вывод картинок Gallery

Код:

    [­[pdoResources?
      &tpl=`galleryLast.tpl`
      &sortby=`{"createdon":"DESC"}`
      &limit=`4`
      &class=`galAlbumItem`
      &loadModels=`gallery`
      &select=`{
        "galAlbumItem": "*",
        "galItem": "*"
      }`
      &leftJoin=`{
        "galItem":{"class":"galItem", "on":"galItem.id = galAlbumItem.item"}
      }`
    ]­]

Шаблон galleryLast.tpl:

<div class="galitem col-xs-12 col-sm-6 col-md-3 col-lg-3">
    <a class="fancybox [­[+cls]­]" rel="last" href="[­[++assets_url]­]gallery/[­[+filename]­]" title='[­[+name]­] - [­[+description]­]'>
        <img class="img-responsive" src="[­[phpthumbon? &input=`[­[++assets_url]­]gallery/[­[+filename]­]` &options=`zc=C,w=300,h=300`]­]">
        <div class="galdescription">
            <p class="h5">[­[+name]­]</p>
            <p class="small">[­[+description]­]</p>
        </div>
    </a>
</div>