Hello there!
In the theming tutorial is suggested to use a while (next_album()): loop to show off all the galleries.
1- If i'm not wrong, this loop is album.php context only.
2- If so how can I display a random image extracted from a definedById album inside index.php? ( following those guidelines for splashpage in zenphoto >
http://www.zenphoto.org/support/topic.php?id=7120#post-41789 )
My purpose here is to create a splashpage for my gallery with just one random image - extracted from a hidden 'splashpage' gallery.
thank you for your kind help
Comments
For now on, I've succeeded in extracting an image from the first gallery this way:
`
<?php
if (next_album())
printCustomAlbumThumbMaxSpace(getBareAlbumTitle(), '800', '300', null, null, null);
?>
`
But what if one wants to extract an image from the gallery #5 ?
Can you point out the functions handling gallery ID?
`getNumAlbums()` returns the correct sum of albums
but
`getAlbumID()` returns a different index and `getAlbumIndex()` just doesn't work
Otherwise you have to use the object model framework.
But for random images see:
http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functiongetRandomImages
http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functiongetRandomImagesAlbum
http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functionprintRandomImages
btw, "gallery" means the whole Zenphoto gallery, you are talking about an "album".