I'm using the printAlbumMenuListAlbum in order to print an albums menu on each page of the gallery.
I don't want it be context sensitive (visitors should have access to the whole gallery from anywhere they are) but I would like to restrict it to one branch of the albums folder. That's because I've separated:
I've searched for some kind of parameter to instruct printAlbumMenuListAlbum to begin for a special 'node' of the albums tree, but didn't find anything; it's either the whole gallery (= all the albums) or context sensitive.
Could you give me some advice on the matter?
Thanks.
I am not sure I understood. There is an option to display only the sub albums for an album and omit the top level. So if you have two top level albums "album1" and "album2" it would just display the sub level of those if within those albums and their childs.
http://www.zenphoto.org/documentation/plugins/_zp-extensions---print_album_menu.php.html#functionprintAlbumMenu
"omit-top" or for jus the sublevels of the current album "list-subs".
If you need more specific menus or behaviour you need to either use the menu manager plugin with several menu sets or create a custom function.
First line of the link you produced says:
"Prints a list of all albums context sensitive." so this won't work as I want to display the same subtree on all the pages of the gallery.
The album element - unless I'm mistaken - only returns a link to a specific album.
What I'm looking for is a combination of both: a whole menu album starting from the one I choose down to the lowest levels.
I think I need to adapt the printAlbumMenu but I don't know how to tell my function where to start from; it's neither the top level, nor the current album. How can I specify the album I want it to start from? id? or name? Which parameter should I need to modify?
If your branches are topl level ones "omit top" does what you want. Within that it folds out context sensitive as usual. Unless you enable it to show all levels always.
This is a quite complicated plugin especially because getting the nested html list correctly done although it "just prints" a list. What you want might be not that easy.
It might be easier to write a simple custom function if you know your album level depth. In any case you need to use/get into the object model and thus always have to use the album name. The id has no role in the object model.
Should have thought about it sooner: the solution is to instantiate a new gallery object which root is the highest level album containing my photos, then call the printAlbumMenuListAlbum for this sub-gallery.
Here it is:
`
$myPhotos = new Album($_zp_gallery, 'galerie/');
$albums = $myPhotos->getAlbums();
printAlbumMenuListAlbum($albums, $albumpath, $currentfolder, $option, $showcount, $showsubs, $css_class, $css_class_topactive, $css_class_active,$firstimagelink,$keeptopactive,$limit);
`