splittingred/Gallery — Issue #172: 'Count' parameter to render in rowTpl
Author: youroff
Created: 2012-01-27 19:44:26+00:00
State: open

I'd like to suggest to add count before applying the limit to show how many photos album includes.

Something like this:
$c->sortby($albumCoverSort,$albumCoverSortDir);
$albumArray['count'] = $modx->getCount('galItem', $c);
$c->limit(1);
$coverItem = $modx->getObject('galItem',$c);