Gallery
Gallery copied to clipboard
2.0.3 issue version data on album/getnodes.class.php
In getNodes, check major_version and not version, for MODX
Furthermore:
In V2 index ['cls'] go to icon
In V3 index ['iconCls'] go to icon and index ['cls'] go to div container
The change is for general but in my dev i add class for div and class for prominent
$version = $this->modx->getVersionData();
if ($version['version'] < 3) {
$albumArray['cls'] = 'icon-tiff'.($album->get('active') ? '' : ' gal-item-inactive');
} else {
//MABOL, aggiunta classe per differenziare album preminenti oppure no, e modificata classe icona e classe div
$albumArray['cls'] = ' '.($album->get('active') ? '' : ' gal-item-inactive');
$albumArray['iconCls'] = 'icon-tiff'.($album->get('active') ? '' : ' icon-gal-item-inactive');
if($album->get('prominent')){
$albumArray['cls'] .= ' gal-item-prominent';
$albumArray['iconCls'] .= ' icon-gal-item-prominent';
}
}
With the below change and css this the result (personalizationed)
test->Active Prominent
test2->Active NOT-Prominent
test3->NOT-Active Prominent
test4->NOT-Active NOT-Prominent