ZenphotoCMS Forum
subalbums next/prev album - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: Themes (https://forum.zenphoto.org/forum-5.html)
+--- Thread: subalbums next/prev album (/thread-1564.html)



subalbums next/prev album - amyg - 27-07-2007

Has anyone worked out a way to make the 'next and previous album' work with subalbums?
Right now, the links send me back to the main gallery page.
thanks in advance




subalbums next/prev album - sbillard - 27-07-2007

Not sure exactly what you are saying, but you might want to check out the effervescence+simpleviewer theme. It has full paging of subalbums.




subalbums next/prev album - amyg - 27-07-2007

Maybe I just needed sleep - I'll try it again - I'm pretty sure I tried with the E.S theme

I want to use this function:
http://www.zenphoto.org/trac/wiki/DeveloperReference#getNextAlbumURLandgetPrevAlbumURL

But what happens is that instead of going to the next album - i end up back at the gallery index - or the next gallery.

I just want users to be able to go album to album, with out having to go back to the index.




subalbums next/prev album - sbillard - 28-07-2007

OK. That function does not yet support subalbums. So it is defaulting to the gallery. I took a quick look. The hack to provide subalbums is not hard, but also not trivial. You would have to make subalbum versions of getNextAlbumURL, getPrevAlbumURL, and the supporting routines: getNextAlbum, getPrevAlbum, getAlbums (you probably can use getSubAlbums for this), and getAlbum.




subalbums next/prev album - amyg - 28-07-2007

OK - I'll try to get my head around that and give it a go
thanks for getting back.




subalbums next/prev album - aitf311 - 10-08-2007

sbillard, I tried to use your code for ticket #2 here: http://www.zenphoto.org/trac/ticket/2 but I see now place to import
subalbumfunctions.php

I replaced my other 2 templates with yours and it doesnt break anything but I dont get to page either. Could you let me know what I am going wrong?!




subalbums next/prev album - sbillard - 10-08-2007

Here is the code you need:
``

put this into your custom-functions.php




subalbums next/prev album - amyg - 14-08-2007

lovely!
Thanks again sbillard