ZenphotoCMS Forum
How to identify image directory - 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: How to identify image directory (/thread-2020.html)



How to identify image directory - rparenti - 03-01-2008

Can the image path/directory be identified from within the album.php or image.php theme templates? getAlbumLinkURL() is a bit specialized doesn't quite do it. Simply an absolute or relative directory path or URL would do it? I'm not seeing it in the template functions guide.

Thanks ... Rob




How to identify image directory - sbillard - 03-01-2008

The folder for an album can be retrieved by the function $album->getFolder().

The variable $_zp_current_album can usually be used, so %_zp_current_album->getFolder() will work in image.php and in album.php as long as you reference it before the next_album() loop. (That loop points $zp_current_album at each subalbum as you go through the loop.




How to identify image directory - rparenti - 03-01-2008

Thanks, that will get me going.

Thanks ... Rob

$album->getFolder()
%_zp_current_album->getFolder()




How to identify image directory - nealhacker - 06-03-2008

I am trying to call the the $album variable in a URL with the following php function:

"

is this the incorrect variable for the album? Do i have to establish the variable in my document before i can use it?

I am trying to add this to album.php




How to identify image directory - nealhacker - 06-03-2008

I am trying to call the the $album variable in a URL with the following php function:

http://www.vimstudio.com/darkroom/share/?client/

is this the incorrect variable for the album? Do i have to establish the variable in my document before i can use it?

I am trying to add this to album.php




How to identify image directory - sbillard - 06-03-2008

I presume you want to output the folder name of the album. That would be echo $_zp_current_album->getFolder();




How to identify image directory - nealhacker - 06-03-2008

This worked perfectly. Thank you.