ZenphotoCMS Forum
Showing random images from current 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: Showing random images from current Album? (/thread-8325.html)



Showing random images from current Album? - fuzzi - 03-03-2011

Hi,

is it possible to show only images from the same sub-album via printRandomImages() function?

I know you can define the Album by $option=album and $rootAlbum=xy - but what to do if i have a Subalbum like:

Artists/Artistname/Drawings/ ? When i add this string manually it works perfectly - but how can i add the right path / subalbum automatically so that printRandomImages() always shows images from the same subalbum im currently in?

Thanks for your help

NK




Showing random images from current Album? - acrylian - 03-03-2011

By using the global album object $_zp_current_album->name.




Showing random images from current Album? - fuzzi - 06-04-2011

works great, thank you!