Hallo again.
I have a "Root" Album and "Subalbum1", "Subalbum2" and "Subalbum3". The 3 subalbums are all children of the "Root".
I am creating a custom page, which can be accessed at "mysite.com/pages/gallery". This page must display contents of the subalbums.
I am stuck at how do I create source for while( next_album() ){}. As far as I see, the next_album() must use some variable that is being created during (pre)processing of a template (index.php, album.php, etc) but I create a custom page and so the question of where to get the stuff is for me open.
well, actually the structure has just become a little more complex:
Root
Category1
Subalbum1
Subalbum2
Category2
Subalbum3
Subalbums are children of categories.
The page will be accessed either from "mysite.com/pages/gallery" or from "mysite.com/pages/gallery?category=categoryname". The I want to process the $_GET (if provided) and display the subalbums of the chosen category.
This implies for me that I need also to print links to the "subpages" of the categories.
So it seems after all that I need to be able:
Probably not what you wish as an answer but it always comes down to the object model:
http://www.zenphoto.org/news/zenphotos-object-model-framework
If I understand it correctly the "category" is just a subalbum. All else would be really unnecessarily complicated.
I even think there is no custom page needed. The better way would be to use the multiple_layouts plugin and create a specific album layout page for different displays.