i dont know Trajan, that didn't seem to work..
foreach only works if the thing you are putting in there is an array
It seems like it's a string though, so foreach isn't what you're looking for.
Try simply:
$body = elgg_view('object/thingtype/'.$vars['entity']->thingtype, $params);
echo elgg_view_image_block($icon, $body, $vars);
Dynamite, thank you so much Matt, got it workin now! I think that shortcut will save me a lot of time down the road.
You need to perhaps send the right stuff to the new view you've created.
echo elgg_view("tpo_theme/column",array('col' => $col2));
So in that view you can get at this 'col' by $vars['col']
If you are on 1.8 its a known bug with elgg_list_entities_from_metadata(). You can replace the list function with get and makesure the entities are fetched. Solution is pass an extra full_view=>false option too in your options array.
thanks trajan, that fixed it
Your solution should work.
Is 'htmlpage/elements/header_logo' the location of your new view containing the html for the new header? Do an upgrade.php everytime you make a new view. Do a var_dump on $header to make sure you are getting back the content of the view
hey thanks, I actually ended up going a different route. I cleared out the header_logo.php file so that its just an empty file and then for each page I just extend the view using:
elgg_extend_view('page/elements/header_logo', 'art/elements/header_art');
This line should go in your 'mod/mymod/page/mymod/page.php' file
This accomplishes the same thing, for anyone interested. In the above code just replace 'art/elements/header_art' with the location of your file. For my pages the header is totally different for each page so my header_logo.php file is blank, but you can put a title in that file, and then extend it with new information. Simple concept for an elgg or php expert, but not that easy for an HTML/CSS user...
oh one more question though, what exactly is a var_dump and how do you do it?
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.