Hi everybody!
Is there a possibility to know, on which level of the album hierarchy an album resides (album, sub album, sub sub album, ...)? I would like something like getAlbumHierarchyLevel().
I didn't find anything in the forum nor in the documentation of the functions.
Many thanks.
Comments
Hint: I'm using a customized zpmobile theme and the zenpage plugin.
Put this function in your theme `functions.php`
`
function printAlbumHierarchyLevel() {
global $_zp_current_album;
$albumname = $_zp_current_album->name;
$level = substr_count($albumname, '/') + 1;
echo "Album level: " . $level;
}
`
(This will give you `Album level: 1` for a top-level album)
Then call `<?php printAlbumHierarchyLevel(); ?>` where you want it to appear in `album.php` and/or `image.php`
Works great, exactly what I was asking for. Thanks.