Hello,
I have this set up where there are parent albums, like Golf and Recreational Centers, and then there's sub albums inside that of different projects under that parent album.
On the image.php I've added a list of all the main albums, not the sub albums, and what I'd like is to create a body class based on the parent albums folder name so that I can style the links to the different albums and indicate the current parent album.
I've looked high and low and can't find something.
This outputs in the complete parent and subfolder, but I just want the parent folder name:`<?php $album = $_zp_current_album->getFolder();?>`
Thanks!!!
Comments
`<?php $album = $_zp_parent_album->getFolder();?>`
or `<?php getParentid();?>`
No big deal. Would be cool though.
When in doubt, check the docs http://www.zenphoto.org/documentation/zenphoto/Album.html#methodgetParent
`<?php <br />
$parent = $_zp_current_album->getParent();
$path = $parent->name;
$folder = array_pop(split('/', $path));
?>`
`<?php<br />
$parent = $_zp_current_album->getParent();
$path = $parent->name;
$folder = array_pop(split('/', $path));
?>`
Nice to see you again! I hope you are doing well.
That rocks!