Hi guys,
I'm using: elgg_list_entities_from_relationship($options);
I get all entities I want just listed...but if I want to customize the way they look, for example get only Icon, name and the city he lives, how can I do?
I'm trying to use elgg_get_entities_from_relationship($options); that give me the user data, but how can I get others information about the user? For example the city?
Thanks
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.
- Trajan@Trajan
Trajan - 0 likes
- li7hium@li7hium
li7hium - 0 likes
- li7hium@li7hium
li7hium - 0 likes
- Trajan@Trajan
Trajan - 0 likes
You must log in to post replies.do they have the city saved as a profile field? (You can't get things that don't exist).
elgg_get_entities_from_relationship(array()); is a good place to start. Then you would run a foreach($objects as $object){} call, and echo whatever you want in there.
If the other information is saved as metadata then you would simply echo $object->city;
Thanks Trajan,
that's right! but what about the profile icon? is there a profile field? I can't find it in the mod/profile/start.php
How can I get the icon or the url?
I've solved with a simple:
elgg_view('profile/icon', array('entity' => $entity,'size' => tiny,'override' => true));
;)
yep that's the correct method for getting icons, well done. If you need more help don't hesitate to ask mate. ;)