Created
October 1, 2016 17:35
-
-
Save pmfx/edd470563e9415554942cfb4521e0a93 to your computer and use it in GitHub Desktop.
Count EvoGallery images MODX snippet.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$output='0'; | |
if($id){ | |
$table = $modx->getFullTableName( 'portfolio_galleries' ); | |
$query = $modx->db->query('SELECT content_id FROM '.$table.' WHERE content_id='.$id.' ORDER BY sortorder ASC'); | |
$output = mysql_num_rows($query); | |
} | |
return $output; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment