From e8d148970261207efbe5435e1abcf68c5ed59cc8 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 15 Jan 2011 15:04:39 +0000 Subject: pages plugin using new layout - still need to get subpages working and navigation git-svn-id: http://code.elgg.org/elgg/trunk@7885 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/pages/new.php | 49 +++++++++++++++++++++---------------------------- 1 file changed, 21 insertions(+), 28 deletions(-) (limited to 'mod/pages/new.php') diff --git a/mod/pages/new.php b/mod/pages/new.php index 2175572b2..8a51d9f03 100644 --- a/mod/pages/new.php +++ b/mod/pages/new.php @@ -1,43 +1,36 @@ getGUID()); +$container_guid = get_input('guid'); + +$container = get_entity($container_guid); +if (!$container) { + } -//if it is a sub page, provide a link back to parent -if(get_input('parent_guid')){ - $parent = get_entity(get_input('parent_guid')); +$page_owner = $container; +if (elgg_instanceof($container, 'object')) { + $page_owner = $container->getContainerEntity(); +} - // Breadcrumbs - $area2 .= elgg_view('pages/breadcrumbs', array('page_owner' => $page_owner, 'parent' => $parent, 'add' => true)); - } +elgg_set_page_owner_guid($page_owner->getGUID); - global $CONFIG; -add_submenu_item(elgg_echo("pages:user", array(elgg_get_page_owner()->name)), "pg/pages/owned/" . elgg_get_page_owner()->username, 'pageslinksgeneral'); +$title = elgg_echo('pages:add'); +elgg_push_breadcrumb($title); -$title = elgg_echo("pages:new"); -$area2 .= elgg_view_title($title); -$area2 .= elgg_view("forms/pages/edit"); +$content = elgg_view("forms/pages/edit"); -$params = array( - 'content' => $area2, - 'sidebar' => $area1 -); -$body = elgg_view_layout('one_column_with_sidebar', $params); +$body = elgg_view_layout('content', array( + 'filter' => '', + 'buttons' => '', + 'content' => $content, + 'title' => $title, +)); -echo elgg_view_page($title, $body); \ No newline at end of file +echo elgg_view_page($title, $body); -- cgit v1.2.3