Hi,
I'm trying to generate a link to the next album but I would like to skip the album view completely. It looks as if for this to occur I need to generate a link to the first image in the next album, not just a link to the next album.
If anybody could give any pointers on how to do this, it would much appreciated. Thank you.
L
Comments
http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functiongetFirstImageURL
http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functiongetLastImageURL
You will have to work with the object model framework.
Thanks for your answer. That's what I figured having looked at the available functions. Could you help me out a bit more by expanding on how to use the object model framework please? That's the bit I'm stuck on.
L
I've managed to bodge a solution together, but I've no idea if it's sound...
`
$PrevAlbum = getPrevAlbum();
$firstimg = $PrevAlbum->getImage(0);
echo rewrite_path("/" . pathurlencode($PrevAlbum->name) . "/" . urlencode($firstimg->filename) . im_suffix(), "/index.php?album=" . urlencode($PrevAlbum->name) . "&image=" . urlencode($firstimg->filename));
`
L
Insert this after the 2nd line:
`
$imgobj = newImage($prevAlbum,$firstimg);
$firstimageeurl = $imgobj->getImageLink();
`