aboutsummaryrefslogtreecommitdiff
path: root/entities
diff options
context:
space:
mode:
Diffstat (limited to 'entities')
-rw-r--r--entities/index.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/entities/index.php b/entities/index.php
index 16dd10879..4f16298e0 100644
--- a/entities/index.php
+++ b/entities/index.php
@@ -37,6 +37,11 @@
}
// Set the body to be the full view of the entity, and the title to be its title
+ if ($entity instanceof ElggObject) {
+ $title = $entity->title;
+ } else if ($entity instanceof ElggEntity) {
+ $title = $entity->name;
+ }
$area2 = elgg_view_entity($entity,true);
if ($shell) {
$body = elgg_view_layout('two_column_left_sidebar', '', $area1 . $area2);
@@ -53,9 +58,10 @@
// Display the page
if ($shell) {
- page_draw("", $body);
- } else {
+ page_draw($title, $body);
+ } else {
header("Content-type: text/html; charset=UTF-8");
+ echo $title;
echo $body;
}