Display list on album page only if it has sub albums

Basically what the title said. I need to display a sub album nav list on album pages, but only if the specific album contains sub albums. I cannot figure out the correct if statement. I think there's a way of getting the number of sub albums, but I'm not sure how to use it in this case.

Thanks in advance!

Comments

  • fretzl Administrator, Developer
    Activate the `print_album_menu` plugin.

    Then you could use something like this:
    `printAlbumMenuList("list-sub",NULL,"","menu-active","submenu","menu-active",$allalbums,false,false);`

    Also have look in `print_album_menu.php` (zp-core/zp-extensions/print_album_menu.php). The functions are well commented.
  • Thanks for the fast response guys. I wasn't being entirely clear in my opening post. I know how to make the list, but I also wanted to include a heading above the list (e.g. "categories, or something like that), which at this point is displayed on every album page, also those without sub albums. But I changed plans a bit, so I've got a follow up question.

    On my album page, I want to display all images out of both the actual album and its sub albums. The sub album menu is then used to 'filter' these images. What would be perfect, is to have a list of checkboxes that correspond to the sub albums, and to omit the pictures from a specific sub album if the checkbox is unchecked. Am I thinking about something unrealistic here? I don't know if this is only possible by doing something with dynamic albums, or if there's an 'easier' way. Cheers!
  • acrylian Administrator, Developer
    Well, "unrealistic" depends on your abilities as you would have to create such a solution yourself as we have nothing similar.
Sign In or Register to comment.