@bohdiC: I added a limit to the galleries mode by making the following change around line 89 of gallery.class.inc.php:
// $result = $modx->db->select("id, pagetitle, longtitle, description, alias, pub_date, introtext, editedby, editedon, publishedon, publishedby, menutitle", $modx->getFullTableName('site_content'), $filter, $this->config['gallerySortBy'] . ' ' . $this->config['gallerySortDir']);
$result = $modx->db->select("id, pagetitle, longtitle, description, alias, pub_date, introtext, editedby, editedon, publishedon, publishedby, menutitle", $modx->getFullTableName('site_content'), $filter, $this->config['gallerySortBy'] . ' ' . $this->config['gallerySortDir'],(!empty($this->config['limit']) ? $this->config['limit'] : ""));
You should be able to use the [+pagetitle+] placeholder in galleries mode.
However, I am trying to fetch the first image from 5
random galleries, and I’m not having any luck so far. Any ideas?
@bwente In galleries mode, the docId points to a parent resource.