Show all albums and sub albums in index.php


Im trying to show all albums and their sub albums in index.php.

I have tried to use the "while (next_album(true).." loop, but it only show the top level albums. What am I doing wrong?


  • acrylian Administrator, Developer
    That is how it is supposed to work. You have to use the object model within the loop instead:

    Quick example to get the title of a subalbum within the loop:
    $subalbs = $_zp_current_album->getAlbums();
    foreach($subalbs as $subalb) {
    $obj = newAlbum($subalb);
    echo $obj->getTitle()."
    This of course gets only the next sublevel.
Sign In or Register to comment.