aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-10 16:05:08 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-10 16:05:08 +0000
commitaf697567987abba8c9f37dcfadda20e5d90cad65 (patch)
tree80a05905bf661d129c00502e7e41ad6aef73c344
parent36a6da62e7c3697e4e59e8734c462dacad639a04 (diff)
downloadelgg-af697567987abba8c9f37dcfadda20e5d90cad65.tar.gz
elgg-af697567987abba8c9f37dcfadda20e5d90cad65.tar.bz2
elgg_view_title can now suppress the submenu
git-svn-id: https://code.elgg.org/elgg/trunk@1393 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/elgglib.php4
-rw-r--r--views/default/page_elements/title.php4
2 files changed, 4 insertions, 4 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index bde7d9499..a529921ce 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -479,9 +479,9 @@
* @param string $title The page title
* @return string The HTML (etc)
*/
- function elgg_view_title($title) {
+ function elgg_view_title($title, $submenu = true) {
- $title = elgg_view('page_elements/title', array('title' => $title));
+ $title = elgg_view('page_elements/title', array('title' => $title, 'submenu' => $submenu));
return $title;
diff --git a/views/default/page_elements/title.php b/views/default/page_elements/title.php
index 74bd16a9d..e2e397aea 100644
--- a/views/default/page_elements/title.php
+++ b/views/default/page_elements/title.php
@@ -25,14 +25,14 @@
$display = "<div id=\"canvas_header\">";
$display .= "<div id=\"canvas_header_icon\">" . $icon . "</div>";
$display .= "<div id=\"canvas_header_content\">" . $info . "</div>";
- if (!empty($submenu))
+ if (!empty($submenu) && $vars['submenu'] == true)
$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>";
- if (!empty($submenu))
+ if (!empty($submenu) && $vars['submenu'] == true)
$display .= "<div id=\"canvas_header_submenu\">" . $submenu . "</div>"; // plugins can extend this to add menu options
$display .= "</div>";
}