![]() |
|
Get all images with tag - 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: Get all images with tag (/thread-8631.html) |
Get all images with tag - rosswil - 2011-05-18 Just checking to see if there is an easy way right now to get all the images with a certain tag as part of a theme I am creating. Thinking this would be something like getImagesWithTag("tag"), but haven't seen any way in the docs I can reproduce that. Just wanted to see if this was already done before I start writing my own custom function. Any guidance on a custom function would be appreciated as well. Thanks! Get all images with tag - sbillard - 2011-05-18 A tag search will do that. You can even create a dynamic album of the search result. Get all images with tag - rosswil - 2011-05-20 Thanks, I have done a tag search using Get all images with tag - acrylian - 2011-05-20 To get an image object, you need the album object first as well. Please look at the object model tutorial. You will need to understand that if you want to display the results without performing an actual search on the search page. The easiest might be to either create a search based on this tag and create a dynamic album. Info on those on the user guide. Get all images with tag - sbillard - 2011-05-20 Actually (fortunately) when you do a $search->getImages() it will return an array of "image names" but the elements of this array are themselves arrays and contain the album and image names. I do not remember exactly the release this was introduced, but at least for 1.4.1 you can just use |