I'm trying to display a list of entities (users, to be precise) with a bit bigger icon than usual (medium). I'd very much like to use the built in elgg_list_entities() function for displaying the user list. However, I couldn't find any way to trickle down the actual icon size information through elgg_list_entitites down to the icon view.
Is there any?
If not, what's my best shortcut for this? Best == minimum amount of custom views and code.
Thx!
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.
- DhrupDeScoop@Dhrup2000

DhrupDeScoop - 0 likes
- Andras Szepeshazi@aszepeshazi

Andras Szepeshazi - 0 likes
- Cim@manacim

Cim - 0 likes
- Juho Jaakkola@juho.jaakkola

Juho Jaakkola - 0 likes
- Andras Szepeshazi@aszepeshazi

Andras Szepeshazi - 0 likes
- DhrupDeScoop@Dhrup2000

DhrupDeScoop - 0 likes
- DhrupDeScoop@Dhrup2000

DhrupDeScoop - 0 likes
You must log in to post replies.trickle -> $size = elgg_extract('size', $vars, 'tiny');
@Dhrup, how and where would I pass 'size' to the elgg_list_entities() function? I know that starting from elgg_view_entity(), size will be picked up from $vars, but my question was referring to the whole call chain from elgg_list_entities() down to the actual entity icon view.
Seems like either I have to refrain from using elgg_list_entities, or conditionally override the entity or icon view on my pages. It would be nice if the list functions would be able to pass some variables through the whole function call chain, though.
you can override the icon size using a theme, for example in views/default/annotation/generic_comment.php on line 26:
change to
There's no need to override anything. When you are listing users you can just pass 'size' to the elgg_list_entities*().
(Note that all entity types do not support the parameter.)
@Juho thanks, that's it! Great news. Didn't know that query options can contain additional information for the views.
it's all just part of the magic global $vars = array() which elgg_extract() [via elgg_list_entities] picks up.
t's all just part of the magic global $vars = array() which elgg_extract($vars) [via elgg_list_entities] picks up. i thought you'd have done your (xdebug) variable xref to trace that thread ;)