diff options
author | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-08-01 13:47:15 +0000 |
---|---|---|
committer | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-08-01 13:47:15 +0000 |
commit | fa39c6aaf2f9f87cfd89feaebdc22cf313396ec7 (patch) | |
tree | a0570c34017059774611c5a9e9ff8067b7905d99 /views/default | |
parent | c2930b6bafa23278a91fbe217f324ad4bcf98e31 (diff) | |
download | elgg-fa39c6aaf2f9f87cfd89feaebdc22cf313396ec7.tar.gz elgg-fa39c6aaf2f9f87cfd89feaebdc22cf313396ec7.tar.bz2 |
Widgets now work in three columns
git-svn-id: https://code.elgg.org/elgg/trunk@1653 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default')
-rw-r--r-- | views/default/canvas/layouts/widgets.php | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/views/default/canvas/layouts/widgets.php b/views/default/canvas/layouts/widgets.php index 57c46f3a4..0815242c8 100644 --- a/views/default/canvas/layouts/widgets.php +++ b/views/default/canvas/layouts/widgets.php @@ -17,8 +17,9 @@ $area1widgets = get_widgets(page_owner(),get_context(),1); $area2widgets = get_widgets(page_owner(),get_context(),2); + $area3widgets = get_widgets(page_owner(),get_context(),3); - if (empty($area1widgets) && empty($area2widgets)) { + if (empty($area1widgets) && empty($area2widgets) && empty($area3widgets)) { if (isset($vars['area3'])) $vars['area1'] = $vars['area3']; if (isset($vars['area4'])) $vars['area2'] = $vars['area4']; @@ -104,8 +105,8 @@ Choose the features you want to add to your page by dragging them from the <b>Wi <div id="rightcolumn_widgets" <?php if(get_context() == "profile")echo "class=\"long\""; ?>> <?php $sidebarwidgetstring = ""; - if (is_array($area2widgets) && sizeof($area2widgets) > 0) { - foreach($area2widgets as $widget) { + if (is_array($area3widgets) && sizeof($area3widgets) > 0) { + foreach($area3widgets as $widget) { if (!empty($sidebarwidgetstring)) { $sidebarwidgetstring .= "::"; } @@ -259,7 +260,7 @@ Choose the features you want to add to your page by dragging them from the <b>Wi <tr> <td colspan="2" align="left" valign="top"> <!-- profile box or 'dashboard info' notice --> - <?php echo $vars['area1']; ?> + <?php if (isset($vars['area1'])) echo $vars['area1']; ?> </td> <td rowspan="2" align="left" valign="top"> <?php @@ -273,7 +274,14 @@ Choose the features you want to add to your page by dragging them from the <b>Wi ?> <div id="widgets_right"> - <!-- this is where we need another widget column adding --> + <?php + + if (is_array($area3widgets) && sizeof($area3widgets) > 0) + foreach($area3widgets as $widget) { + echo elgg_view_entity($widget); + } + + ?> </div><!-- /#widgets_right --> </td> |