Hi Alex,
?view is kinda a special variable within Elgg, it changes the viewtype you're using. Normaly every thing in viewed from /views/default, but if you set view=print the system looks in /views/print.
Since there a probably no views in this directory no content will be displayed.
Easiest solution, don't call the var 'view' but maybe ?print=1
Hope this helps
Great - thanks for your help Jerome. I will give that a shot.
Assuming $post is an ElggObject of subtype 'electrical' and your code uses $post->quantity = $quantity; to assign the value, it is stored as metadata.
You can use:
$content = elgg_list_entities_from_metadata(array(
'type' => 'object',
'subtype' => 'electrical',
'full_view' => false,
'view_toggle_type' => false,
'limit' => 10,
'pagination' => true,
'order_by_metadata' => array(
'name' => 'quantity',
'direction' => 'DESC',
'as' => 'integer'),
));
Great - thanks so much. I had tried elgg_get_entities_from_metadata and didnt get any results but your code with elgg_list_entities_from_metadata works perfectly. 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.