aboutsummaryrefslogtreecommitdiff
path: root/views/default/page/layouts/content.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/page/layouts/content.php')
-rw-r--r--views/default/page/layouts/content.php24
1 files changed, 16 insertions, 8 deletions
diff --git a/views/default/page/layouts/content.php b/views/default/page/layouts/content.php
index ea27ab7f2..c406c9faf 100644
--- a/views/default/page/layouts/content.php
+++ b/views/default/page/layouts/content.php
@@ -10,13 +10,21 @@
* @uses $vars['filter'] HTML of the content area filter (override)
* @uses $vars['title'] Title text (override)
* @uses $vars['context'] Page context (override)
- * @uses $vars['buttons'] Content header buttons (override)
* @uses $vars['filter_context'] Filter context: everyone, friends, mine
* @uses $vars['class'] Additional class to apply to layout
*/
-// navigation defaults to breadcrumbs
-$nav = elgg_extract('nav', $vars, elgg_view('navigation/breadcrumbs'));
+// give plugins an opportunity to add to content sidebars
+$sidebar_content = elgg_extract('sidebar', $vars, '');
+$params = $vars;
+$params['content'] = $sidebar_content;
+$sidebar = elgg_view('page/layouts/content/sidebar', $params);
+
+// allow page handlers to override the default header
+if (isset($vars['header'])) {
+ $vars['header_override'] = $vars['header'];
+}
+$header = elgg_view('page/layouts/content/header', $vars);
// allow page handlers to override the default filter
if (isset($vars['filter'])) {
@@ -33,13 +41,13 @@ $params = $vars;
$params['content'] = $footer_content;
$footer = elgg_view('page/layouts/content/footer', $params);
+$body = $header . $filter . $content . $footer;
+
$params = array(
- 'title' => $vars['title'],
- 'content' => $filter . $content . $footer,
- 'sidebar' => elgg_extract('sidebar_alt', $vars, ''),
- 'sidebar_alt' => elgg_extract('sidebar', $vars, ''),
+ 'content' => $body,
+ 'sidebar' => $sidebar,
);
if (isset($vars['class'])) {
$params['class'] = $vars['class'];
}
-echo elgg_view_layout('two_sidebar', $params); \ No newline at end of file
+echo elgg_view_layout('one_sidebar', $params);