![]() |
|
Print number of elements in an album - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: Themes (https://forum.zenphoto.org/forum-5.html) +--- Thread: Print number of elements in an album (/thread-13211.html) |
Print number of elements in an album - davidarnoult - 2019-03-11 Hello, I need to print the number of elements (sub albums + images) contained in the current album. I have found this function printAlbumData but I have no clue on the name of the available fields. Is there a way to do so? Thanks David Print number of elements in an album - acrylian - 2019-03-12
For the direct child element count use these in the related theme context: https://docs.zenphoto.org/function-getNumAlbums.html There are similar methodes on the core object model level as well. Additionally there are for all imges on all sublevels (may be performance costly): There is no similar function for counting albums but you can use: Additionally the image_album_statistics plugin provides a function to get the number of all sub albums on all levels for an albums. Print number of elements in an album - davidarnoult - 2019-03-12 Thank you, this is great. Do you know how to get and print the current album ID then? How to use getTotalImagesIn for direct child elements of the current album ? It requires Album object. Thank you... Print number of elements in an album - acrylian - 2019-03-12
Print number of elements in an album - davidarnoult - 2019-03-30 Thank you for your support Acrylian, this is perfect :smile: |