ZenphotoCMS Forum
Display all albums and subalbums - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: Display all albums and subalbums (/thread-7613.html)



Display all albums and subalbums - beatricewebb - 2010-09-14

My gallery has several albums some of them contain
subalbums. I want to list on a single page all my albums and subalbums if they contain any. Please can someone advise me on the code I need to do this.

Using the "album loop" I can list my albums:

`

"

title="">

"

title="">

`

How do I modify this code to capture and list the albums and subalbums as well?




Display all albums and subalbums - acrylian - 2010-09-14

You will have to use the object model and create subloops within that loop. Please see the tutorial on the user guide.




Display all albums and subalbums - beatricewebb - 2010-09-15

By placing the following for loop inside the 'album loop', I have been able to list the album titles of all the subalbums contained in my albums:

`

`




Display all albums and subalbums - acrylian - 2010-09-15

If you want just a nested list of the names you could also use the print_album_menu plugin.