Elgg v1.0 has a completely new views system. It is now possible to create multiple views for objects and extend existing views in order to build your Elgg out exactly how you want.
//add submenu options if (get_context() == "profile") { add_submenu_item(elgg_echo('profile:editdetails'), $CONFIG->wwwroot . "mod/profile/edit.php"); add_submenu_item(elgg_echo('profile:editicon'), $CONFIG->wwwroot . "mod/profile/editicon.php"); }
In Elgg is it possible to create as many canvas areas as you like. These canvas areas control the layout and display of all plugin contents. The default canvas areas that Elgg has are: one_column, two_column, widgets, groups.
To call a particular canvas area, use the follow function.
$type is the canvas layout you want e.g. 'one_column' and the following variables ($area1, $area2 etc) are the content to be displayed.
Here is a sample:
// now we grab all the topics for the selected forum $forumtopics = $forum_entity->getEntitiesFromRelationship("forum_topic"); // Set layout $area1 = elgg_view("forums/viewtopics", array('forumtopics' => $forumtopics)); $body = elgg_view_layout("one_column", $area1); // Display page page_draw(sprintf(elgg_echo('forums:user')),$body);