Gallery icon indicating copy to clipboard operation
Gallery copied to clipboard

2.0.3 issue version data on album/getnodes.class.php

Open SilverMabol opened this issue 10 months ago • 1 comments

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';	
	}
}

SilverMabol avatar Feb 04 '25 01:02 SilverMabol

With the below change and css this the result (personalizationed) immagine test->Active Prominent test2->Active NOT-Prominent test3->NOT-Active Prominent test4->NOT-Active NOT-Prominent

SilverMabol avatar Feb 04 '25 02:02 SilverMabol