Hello! Please tell me how in ModX Revo using the Gallery plugin to display the first picture of the album, provided that the album is displayed like this: There is a gallery, it has subsections derived via pdoMenu, and in the subkeys chunk for a slider-carousel.
The code for output subkeys:
<li[[+classes]]> <div> <h2>[[+pagetitle]] </h2> <div id="slider"> <div id="slider_box"> [[pdoMenu? &parents=`[[+id]]` &tpl=`albumsrow`]] </div> <div id="nav_slider"> <div id="left_nav"></div> <div id="right_nav"></div> </div> </div> </div> </li> The pdoMenu chunk code is above:
<li><div class="img"><a href="[[+link]]"> <div> [[!pdoResources? &sortby=`id` &class=`galItem` &limit=`1` &sortdir=`Asc` &resources=`79, 81` ]] </div> <div> <span class="date">[[+publishedon:date=`%d.%m.%Y`]]</span> <br> <span>[[+pagetitle]]</span> </div> </a> </div> </li> Made, as you can see, through pdoResources, he takes the first picture from the first album, and puts for each element of the list.
In general, I need help: maybe there are other ways to get the first picture from the album, no difference from the Gallery album or the page on which the album is called.
I have a plugin for pulling out the first picture from [[* content]], but I don’t know how to edit it to get a picture not from the content.