From 0f2fb0a3e338d926502c73772b15ba7d4f034034 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 11 Dec 2010 23:11:59 +0000 Subject: supporting an additional class on primary layouts git-svn-id: http://code.elgg.org/elgg/trunk@7601 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/layout/shells/content.php | 4 ++++ views/default/layout/shells/one_column.php | 13 +++++++++++-- views/default/layout/shells/one_sidebar.php | 9 ++++++++- views/default/layout/shells/two_sidebar.php | 8 +++++++- 4 files changed, 30 insertions(+), 4 deletions(-) diff --git a/views/default/layout/shells/content.php b/views/default/layout/shells/content.php index b46f09ac1..787445fd1 100644 --- a/views/default/layout/shells/content.php +++ b/views/default/layout/shells/content.php @@ -12,6 +12,7 @@ * @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 */ // give plugins an opportunity to add to content sidebars @@ -50,4 +51,7 @@ $params = array( 'body' => $body, 'sidebar' => $sidebar, ); +if (isset($vars['class'])) { + $params['class'] = $vars['class']; +} echo elgg_view_layout('one_sidebar', $params); diff --git a/views/default/layout/shells/one_column.php b/views/default/layout/shells/one_column.php index 84a304e14..ff0070e18 100644 --- a/views/default/layout/shells/one_column.php +++ b/views/default/layout/shells/one_column.php @@ -6,11 +6,20 @@ * @subpackage Core * * @uses $vars['content'] Content string + * @uses $vars['class'] Additional class to apply to layout */ + +$class = 'elgg-layout-one-column elgg-center elgg-width-classic clearfix'; +if (isset($vars['class'])) { + $class = "$class {$vars['class']}"; +} ?> -
+
- +
\ No newline at end of file diff --git a/views/default/layout/shells/one_sidebar.php b/views/default/layout/shells/one_sidebar.php index 2e78b0de6..4c98c31d1 100644 --- a/views/default/layout/shells/one_sidebar.php +++ b/views/default/layout/shells/one_sidebar.php @@ -7,10 +7,17 @@ * * @uses $vars['body'] Content HTML for the main column * @uses $vars['sidebar'] Optional content that is displayed in the sidebar + * @uses $vars['class'] Additional class to apply to layout */ + +$class = 'elgg-layout-sidebar elgg-center elgg-width-classic clearfix'; +if (isset($vars['class'])) { + $class = "$class {$vars['class']}"; +} + ?> -
+
-
+