diff options
author | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-06-12 17:57:25 +0000 |
---|---|---|
committer | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-06-12 17:57:25 +0000 |
commit | 683f50786a7aec4a936b7b5d59a8e6338b1c7071 (patch) | |
tree | c674bb5a47b3ac98837743d09991013a33232fb1 /views/default/canvas | |
parent | d423fd2379171706c75c60600442a2dbdc12d87a (diff) | |
download | elgg-683f50786a7aec4a936b7b5d59a8e6338b1c7071.tar.gz elgg-683f50786a7aec4a936b7b5d59a8e6338b1c7071.tar.bz2 |
Widgets, including a test widget plugin
git-svn-id: https://code.elgg.org/elgg/trunk@900 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/canvas')
-rw-r--r-- | views/default/canvas/layouts/widgets.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/views/default/canvas/layouts/widgets.php b/views/default/canvas/layouts/widgets.php index e98d2f99a..39a5b92c9 100644 --- a/views/default/canvas/layouts/widgets.php +++ b/views/default/canvas/layouts/widgets.php @@ -11,6 +11,33 @@ * @link http://elgg.org/ */ + $widgettypes = get_widget_types(); + + if (is_array($widgettypes) && sizeof($widgettypes) > 0) { + +?> + + <p> + <b>Temporarily, add a widget to this page:</b><br /> + +<?php + + foreach($widgettypes as $handler => $widgettype) { + $url = $vars['url'] . "action/widgets/add"; + $url .= "?handler=" . $handler; + $url .= "&context=" . get_context(); + $url .= "&user=" . page_owner(); + $url .= "&column=1"; + echo "<a href=\"{$url}\">{$widgettype->name}</a><br />"; + } + +?> + </p> + +<?php + + } + ?> <!-- right sidebar --> @@ -22,6 +49,7 @@ <?php if ($widgets = get_widgets(page_owner(),get_context(),2)) { + if (is_array($widgets) && sizeof($widgets) > 0) foreach($widgets as $widget) { echo elgg_view_entity($widget); } @@ -44,6 +72,7 @@ <?php if ($widgets = get_widgets(page_owner(),get_context(),1)) { + if (is_array($widgets) && sizeof($widgets) > 0) foreach($widgets as $widget) { echo elgg_view_entity($widget); } |