I'm saving an entity object of type entity and subtype album. When saving the album, I also save it with image files who's $ownerGUID = $album-> GUID
. They get uploaded OK. The problem I'm now having is when it comes to retrieving the images. How can I go about listing all the images that belong to a particular album?
Thank you all in advance.
Elgg 2.X
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- ihayredinov@ihayredinov
ihayredinov - 1 like
- Revilo@Revilo
Revilo - 0 likes
- ihayredinov@ihayredinov
ihayredinov - 0 likes
You must log in to post replies.There is no such type as 'entity', only 'object', 'user', 'group' and 'site'. By design entity owners should be user entities (there are rare exceptions, but you want to avoid that). Set your image's container_guid to album's guid, and use elgg_get_entities().
Thank you for the reply @Ismayil Khayredinov. How do I then loop through and display the images? I don't think I can use something like $description = $image -> description; here