ZenphotoCMS Forum
how to getAlbumLinkURL() for album's parent - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: how to getAlbumLinkURL() for album's parent (/thread-10669.html)



how to getAlbumLinkURL() for album's parent - usartdude - 2012-12-21

I want to make a link for a subalbum's parent album. I think i need some combination of getParent() and html_encode(getAlbumLinkURL())

This is probably simple, but I don't know how to do it.

thanks if you can help




how to getAlbumLinkURL() for album's parent - fretzl - 2012-12-21

linktext




how to getAlbumLinkURL() for album's parent - acrylian - 2012-12-21

Not correct actually (even wrong single quotes..;-)).. getParent() returns an object if there is a parent. So in case there is you could use $_zp_current_album->getParent()->getAlbumLink(). Better is a check like this:
`
$parent = $_zp_current_album->getParent();
if(is_object($parent)) {
?>
linktext




how to getAlbumLinkURL() for album's parent - fretzl - 2012-12-21

:[ embarrassment...




how to getAlbumLinkURL() for album's parent - acrylian - 2012-12-21

Sorry...:-)




how to getAlbumLinkURL() for album's parent - usartdude - 2012-12-21

Thanks for the help, it worked perfectly! I'm going to send a small donation to Zenphoto in your honor.