aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'views/default')
-rw-r--r--views/default/object/plugin.php2
-rw-r--r--views/default/page/components/widget.php15
-rw-r--r--views/default/page/layouts/widgets.php3
3 files changed, 12 insertions, 8 deletions
diff --git a/views/default/object/plugin.php b/views/default/object/plugin.php
index befd61018..e9cacca35 100644
--- a/views/default/object/plugin.php
+++ b/views/default/object/plugin.php
@@ -4,7 +4,7 @@
*
* @package Elgg.Core
* @subpackage Plugins
- *
+ *
* @todo This view really should be used to display visualization on the admin panel, \
* rather than emitting the settings forms
*/
diff --git a/views/default/page/components/widget.php b/views/default/page/components/widget.php
index d5e2c4ca2..e7a16b318 100644
--- a/views/default/page/components/widget.php
+++ b/views/default/page/components/widget.php
@@ -33,15 +33,18 @@ $controls = elgg_view('layout/objects/widget/controls', array(
'show_edit' => $edit_area != '',
));
-
-if (elgg_view_exists("widgets/$handler/content")) {
- $content = elgg_view("widgets/$handler/content", $vars);
+// don't show content for default widgets
+if (elgg_in_context('default_widgets')) {
+ $content = '';
} else {
- elgg_deprecated_notice("widgets use content as the display view", 1.8);
- $content = elgg_view("widgets/$handler/view", $vars);
+ if (elgg_view_exists("widgets/$handler/content")) {
+ $content = elgg_view("widgets/$handler/content", $vars);
+ } else {
+ elgg_deprecated_notice("widgets use content as the display view", 1.8);
+ $content = elgg_view("widgets/$handler/view", $vars);
+ }
}
-
$widget_id = "elgg-widget-$widget->guid";
$widget_instance = "elgg-widget-instance-$handler";
$widget_class = "elgg-module elgg-module-widget";
diff --git a/views/default/page/layouts/widgets.php b/views/default/page/layouts/widgets.php
index 4c98a156c..eac9d43fc 100644
--- a/views/default/page/layouts/widgets.php
+++ b/views/default/page/layouts/widgets.php
@@ -2,7 +2,7 @@
/**
* Elgg widgets layout
*
- * @uses $vars['content'] Optional display box at the top of layout
+ * @uses $vars['content'] Optional display box at the top of layout
* @uses $vars['num_columns'] Number of widget columns for this layout (3)
* @uses $vars['show_add_widgets'] Display the add widgets button and panel (true)
* @uses $vars['exact_match'] Widgets must match the current context (false)
@@ -15,6 +15,7 @@ $exact_match = elgg_extract('exact_match', $vars, false);
$show_access = elgg_extract('show_access', $vars, true);
$owner = elgg_get_page_owner_entity();
+
$context = elgg_get_context();
elgg_push_context('widgets');