aboutsummaryrefslogtreecommitdiff
path: root/views/default/layouts
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-18 16:54:02 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-18 16:54:02 +0000
commita24e700999b38185bea3e80dc8461aed271406cb (patch)
treef63cf545c33910e7f83aaf64a7857c0843cc279d /views/default/layouts
parentc5854870424d87372bcc86a7edf75b9bf8841825 (diff)
downloadelgg-a24e700999b38185bea3e80dc8461aed271406cb.tar.gz
elgg-a24e700999b38185bea3e80dc8461aed271406cb.tar.bz2
Refs #1793 getting sorted widgets from elgg_get_widgets()
git-svn-id: http://code.elgg.org/elgg/trunk@7339 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/layouts')
-rw-r--r--views/default/layouts/widgets.php15
1 files changed, 4 insertions, 11 deletions
diff --git a/views/default/layouts/widgets.php b/views/default/layouts/widgets.php
index 38451d1c1..74cb6da8d 100644
--- a/views/default/layouts/widgets.php
+++ b/views/default/layouts/widgets.php
@@ -15,7 +15,7 @@ $owner = elgg_get_page_owner();
$context = elgg_get_context();
elgg_push_context('widgets');
-elgg_get_widgets($owner->guid, $context);
+$widgets = elgg_get_widgets($owner->guid, $context);
if (elgg_can_edit_widgets()) {
if ($show_add_widgets) {
@@ -32,18 +32,11 @@ echo $vars['box'];
$widget_class = "widget_{$num_columns}_columns";
for ($column_index = 1; $column_index <= $num_columns; $column_index++) {
- $widgets = get_widgets($owner->guid, $context, $column_index);
-
- // test code during design and implementation
- $widget1 = new ElggWidget();
- $widget1->handler = 'test';
- $widget2 = new ElggWidget();
- $widget2->handler = 'test';
- $widgets = array($widget1, $widget2);
+ $column_widgets = $widgets[$column_index];
echo "<div class=\"widget_column $widget_class widget_col_$column_index\">";
- if (is_array($widgets) && sizeof($widgets) > 0) {
- foreach ($widgets as $widget) {
+ if (is_array($column_widgets) && sizeof($column_widgets) > 0) {
+ foreach ($column_widgets as $widget) {
echo elgg_view_entity($widget);
}
}