aboutsummaryrefslogtreecommitdiff
path: root/views/default/page
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/page')
-rw-r--r--views/default/page/components/module.php22
1 files changed, 8 insertions, 14 deletions
diff --git a/views/default/page/components/module.php b/views/default/page/components/module.php
index b1198ee9a..0a2f1c35a 100644
--- a/views/default/page/components/module.php
+++ b/views/default/page/components/module.php
@@ -2,10 +2,10 @@
/**
* Elgg module element
*
- * @uses $vars['title'] Title text
- * @uses $vars['header'] HTML content of the header
+ * @uses $vars['title'] Optional title text (do not pass header with this option)
+ * @uses $vars['header'] Optional HTML content of the header
* @uses $vars['body'] HTML content of the body
- * @uses $vars['footer'] HTML content of the footer
+ * @uses $vars['footer'] Optional HTML content of the footer
* @uses $vars['class'] Optional additional class for module
* @uses $vars['id'] Optional id for module
* @uses $vars['show_inner'] Optional flag to leave out inner div (default: false)
@@ -28,22 +28,16 @@ if (isset($vars['id'])) {
$id = "id=\"{$vars['id']}\"";
}
-if (isset($vars['header'])) {
- if ($vars['header']) {
- $header = "<div class=\"elgg-head\">$header</div>";
- }
-} else {
+if ($vars['header']) {
+ $header = "<div class=\"elgg-head\">$header</div>";
+} elseif ($title) {
$header = "<div class=\"elgg-head\"><h3>$title</h3></div>";
}
$body = "<div class=\"elgg-body\">$body</div>";
-if (isset($vars['footer'])) {
- if ($vars['footer']) {
- $footer = "<div class=\"elgg-foot\">$footer</div>";
- }
-} else {
- $footer = "<div class=\"elgg-foot\"></div>";
+if ($footer) {
+ $footer = "<div class=\"elgg-foot\">$footer</div>";
}
$contents = $header . $body . $footer;