I have my next and previous album links working correctly, but as it is now, once you reach the first or the last album, the respective link just goes to the index. Is there a way to hide the Previous Album link on the first album and the Next Album link on the last album?
Comments
`<?php if (hasPrevImage()) { ?> " title="Previous Image">« prev <?php } ?>
<?php if (hasNextImage()) { ?> " title="Next Image">next »<?php } ?>`
tried replacing the word `image` with `album` in every instance, but that didn't work. ;-)
Providing your using the latest code for Zenphoto, you should be able to use functions which are pretty new and documented here:
http://www.zenphoto.org/trac/wiki/DeveloperReference#getNextAlbumURLandgetPrevAlbumURL
They are part of the core code. Now, as far as the hasPrevImage() thing, I don't think there are comparable functions that exist that do that same thing, at least not from what I can see.
That's probably an easy change to make though.
Try:
`function hasNextAlbum() { global $_zp_current_album; return $_zp_current_album->getNextAlbum(); }
function hasPrevAlbum() { global $_zp_current_album; return $_zp_current_album->getPrevAlbum(); }`
I haven't had a chance to test it yet, but maybe Tris will have a sec to run over it briefly.