diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-11 23:11:59 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-11 23:11:59 +0000 |
commit | 0f2fb0a3e338d926502c73772b15ba7d4f034034 (patch) | |
tree | b405b977ce366f7ff17bd2343da309303b3c5180 /views/default/layout | |
parent | ea57b422a843d6c6d07e29bc944d953c72d1f86f (diff) | |
download | elgg-0f2fb0a3e338d926502c73772b15ba7d4f034034.tar.gz elgg-0f2fb0a3e338d926502c73772b15ba7d4f034034.tar.bz2 |
supporting an additional class on primary layouts
git-svn-id: http://code.elgg.org/elgg/trunk@7601 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/layout')
-rw-r--r-- | views/default/layout/shells/content.php | 4 | ||||
-rw-r--r-- | views/default/layout/shells/one_column.php | 13 | ||||
-rw-r--r-- | views/default/layout/shells/one_sidebar.php | 9 | ||||
-rw-r--r-- | 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']}"; +} ?> -<div class="elgg-layout-one_column elgg-center elgg-width-classic clearfix"> +<div class="<?php echo $class; ?>"> <div class="elgg-body"> <?php echo $vars['content']; ?> - <?php echo $vars['area1']; ?> + <?php + // @deprecated 1.8 + echo $vars['area1']; + ?> </div> </div>
\ 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']}"; +} + ?> -<div class="elgg-layout-sidebar elgg-center elgg-width-classic clearfix"> +<div class="<?php echo $class; ?>"> <div class="elgg-sidebar elgg-aside"> <?php echo elgg_view('layout/elements/sidebar', $vars); diff --git a/views/default/layout/shells/two_sidebar.php b/views/default/layout/shells/two_sidebar.php index cc4eee78b..23a5a9dd4 100644 --- a/views/default/layout/shells/two_sidebar.php +++ b/views/default/layout/shells/two_sidebar.php @@ -8,10 +8,16 @@ * @uses $vars['content'] The content string for the main column * @uses $vars['sidebar'] Optional content that is displayed in the sidebar * @uses $vars['sidebar-alt'] Optional content that is displayed in the alternate sidebar + * @uses $vars['class'] Additional class to apply to layout */ + +$class = 'elgg-layout-two-sidebar elgg-center elgg-width-classic clearfix'; +if (isset($vars['class'])) { + $class = "$class {$vars['class']}"; +} ?> -<div class="elgg-layout-two-sidebar elgg-center elgg-width-classic clearfix"> +<div class="<?php echo $class; ?>"> <div class="elgg-sidebar elgg-aside"> <?php echo elgg_view('layout/elements/sidebar', $vars); |