aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/default/canvas_header/submenu_template.php10
-rw-r--r--views/default/page_elements/title.php7
2 files changed, 15 insertions, 2 deletions
diff --git a/views/default/canvas_header/submenu_template.php b/views/default/canvas_header/submenu_template.php
new file mode 100644
index 000000000..ff43ac153
--- /dev/null
+++ b/views/default/canvas_header/submenu_template.php
@@ -0,0 +1,10 @@
+<?php
+
+ if (isset($vars['selected']) && $vars['selected'] == true) {
+ $selected = "class=\"selected\"";
+ } else {
+ $selected = "";
+ }
+
+?>
+<li <?php echo $selected; ?>><a href="<?php echo $vars['href']; ?>"><?php echo $vars['label']; ?></a></li> \ No newline at end of file
diff --git a/views/default/page_elements/title.php b/views/default/page_elements/title.php
index aa1946514..aac3babae 100644
--- a/views/default/page_elements/title.php
+++ b/views/default/page_elements/title.php
@@ -16,19 +16,22 @@
$page_owner = page_owner();
$page_owner_user = get_user($page_owner);
+ $submenu = get_submenu(); // elgg_view('canvas_header/submenu');
+ if (!empty($submenu)) $submenu = "<ul>" . $submenu . "</ul>";
+
if($page_owner && $page_owner_user->guid != $_SESSION['user']->getGUID()) {
$info = "<h2>" . $vars['title'] . "</h2>";
$icon = elgg_view("profile/icon",array('entity' => $page_owner_user, 'size' => 'tiny'));
$display = "<div id=\"canvas_header\">";
$display .= "<div id=\"canvas_header_icon\">" . $icon . "</div>";
$display .= "<div id=\"canvas_header_content\">" . $info . "</div>";
- $display .= "<div id=\"canvas_header_submenu\">" . elgg_view("canvas_header/submenu") . "</div>"; // plugins can extend this to add menu options
+ $display .= "<div id=\"canvas_header_submenu\">" . $submenu . "</div>"; // plugins can extend this to add menu options
$display .= "</div>";
} else {
$info = "<h2>" . $vars['title'] . "</h2>";
$display = "<div id=\"canvas_header\">";
$display .= "<div id=\"canvas_header_content\">" . $info . "</div>";
- $display .= "<div id=\"canvas_header_submenu\">" . elgg_view("canvas_header/submenu") . "</div>"; // plugins can extend this to add menu options
+ $display .= "<div id=\"canvas_header_submenu\">" . $submenu . "</div>"; // plugins can extend this to add menu options
$display .= "</div>";
}