Created
February 7, 2011 19:23
-
-
Save seamusleahy/815009 to your computer and use it in GitHub Desktop.
Output a list of the images in a NextGEN gallery
This file contains 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
<ul> | |
<?php | |
// nggdb::get_gallery( <gallery ID> ) | |
// Get an array of nggImage objects. | |
$slides = nggdb::get_gallery( 1 ); | |
foreach( $slides as $slide ) { | |
// To see all the methods and attributes available, nextgen-gallery/lib/image.php | |
echo '<li><img src="'.($slide->cached_singlepic_file( 872, 331 )).'" alt="'.esc_attr($slide->alttext).'" /></li>'; | |
} | |
?> | |
</li> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment