[[!getPage? &elementClass=`modSnippet` &element=`getResources` &parents=`[[*id]]` &depth=`1` &showHidden=`1` &includeTVs=`1` &processTVs=`1` &limit=`9` &pageVarKey=`page` &tpl=`dpp_v2.ArticleRowTpl` &pageNavOuterTpl ]] [[!+page.nav:notempty=` <ul class="paging"> [[!+page.nav]] </ul> `]]
<div class="col-xs-12 col-sm-6 col-md-4"> <div class="thumbnail"> <img src="[[!phpthumbof? &input=`/assets/gallery/[[!getGalleryAlbumCover? &id=`[[+tv.galleryAlbum]]`]]` &options=`&w=345&h=345&zc=1&q=80`]]" alt="Thumbnail" class="img-responsive"> <div class="caption"> <h3>[[+pagetitle:lcase]]</h3> <p>[[+introtext:lcase]]</p> <p class="center-block"><a href="[[~[[+id]]]]" class="plus-btn">plus</a></p> </div> </div> </div>
This question has been answered by Bruno17. See the first response.
[[!getResources? &parents=`[[*id]]` &depth=`1` &showHidden=`1` &includeTVs=`1` &includeTVList=`galleryAlbum` &processTVs=`1` &tvFilters=`articlestags==%[[!getUrlParam? &name=`kategorie`]]%` &limit=`99` &pageVarKey=`page` &tpl=`dpp_v2.ArticleRowTpl` ]]
[[!getUrlParam? &name=`kategorie`]]
return $output;
$modx->setPlaceholder('url_param', $output); return '';
&tvFilters=`articlestags==%[[+url_param]]%`
[[getResources? &parents=`[[*id]]` &depth=`1` &showHidden=`1` &includeTVs=`1` &includeTVList=`galleryAlbum` &processTVs=`1` &limit=`99` &pageVarKey=`page` &tpl=`dpp_v2.ArticleRowTpl` ]]
[[!getResources? &parents=`[[*id]]` &depth=`1` &showHidden=`1` &includeTVs=`1` &includeTVList=`galleryAlbum` &processTVs=`1` &limit=`99` &pageVarKey=`page` &tpl=`dpp_v2.ArticleRowTpl` ]]
[[+id]]<br />
[[phpthumbof? &input=`/assets/gallery/[[getGalleryAlbumCover? &id=`[[+tv.galleryAlbum]]`]]` &options=`&w=345&h=345&zc=1&q=80`]]
//getGalleryAlbumCover $output = ''; $sql = "select * from modx_gallery_albums mga where mga.id = $id"; $album = $modx->query($sql); if (!is_object($album)) { return; } $data = $album->fetch(PDO::FETCH_ASSOC); $modx->toPlaceholders($data); $output = $data['cover_filename']; return $output;
$modx->toPlaceholders($data);
//getGalleryAlbumCover $toPlaceholders = $modx->getOption('toPlaceholders',$scriptProperties,'1'); $output = ''; $sql = "select * from modx_gallery_albums mga where mga.id = $id"; $album = $modx->query($sql); if (!is_object($album)) { return; } $data = $album->fetch(PDO::FETCH_ASSOC); if (!empty($toPlaceholders)){ $modx->toPlaceholders($data); } $output = $data['cover_filename']; return $output;
[[getGalleryAlbumCover? &toPlaceholders=`0` &id=`[[+tv.galleryAlbum]]`]]