aboutsummaryrefslogtreecommitdiff
path: root/pages/subgroups/owner.php
blob: ae06d968d365a675db4c1c2e1777101074506e4d (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
37
38
<?php
/**
 * List of group's subgroups
 *
 * @package ElggSubgroups
 */

elgg_load_library('elgg:subgroups');

// access check for closed groups
group_gatekeeper();

$owner = elgg_get_page_owner_entity();
if (!$owner) {
	forward('groups/all');
}

elgg_register_title_button();

$title = elgg_echo("subgroups:owner", array($owner->name));

elgg_push_breadcrumb(elgg_echo('groups'), "groups/all");
elgg_push_breadcrumb($owner->name, $owner->getURL());
elgg_push_breadcrumb(elgg_echo('relatedgroups'));

// List
$content = list_subgroups($owner);
if (!$content) {
	$content = elgg_echo("subgroups:none");
}

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

echo elgg_view_page($title, $body);