aboutsummaryrefslogtreecommitdiff
path: root/mod/pages/new.php
blob: 8a51d9f0374dc247b84ac1551baa9b64446a300b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
/**
 * Create a new page
 *
 * @package ElggPages
 */

gatekeeper();

$container_guid = get_input('guid');

$container = get_entity($container_guid);
if (!$container) {

}

$page_owner = $container;
if (elgg_instanceof($container, 'object')) {
	$page_owner = $container->getContainerEntity();
}

elgg_set_page_owner_guid($page_owner->getGUID);

$title = elgg_echo('pages:add');
elgg_push_breadcrumb($title);

$content = elgg_view("forms/pages/edit");

$body = elgg_view_layout('content', array(
	'filter' => '',
	'buttons' => '',
	'content' => $content,
	'title' => $title,
));

echo elgg_view_page($title, $body);