Is it possible to create a Custom Widget that behaves like the 'Deprecation Errors' warning on the Dashboard? When active, the widget would appear on all users', or particular user groups, dashboards at the top and display new information, warnings and anything else that may be of use.
-
I'm not a plugin developer so I can't help you out here, but there are some docs on the Craft site that might be of help: buildwithcraft.com/docs/plugins/widgets– Jamie WadeCommented Oct 15, 2014 at 9:19
-
I've created Widgets before and that's no problem... I guess the question is more around exposing the widget to users i.e. adding the widget to all users', or user groups', dashboards.– Neal HulmeCommented Oct 15, 2014 at 16:36
Add a comment
|
1 Answer
There’s no such thing as a “global” widget right row, however your widget’s getBodyHtml()
method can return false
, which tells Craft to not show the widget at all. So you could just have the widget assigned to all the user accounts you want, and always return false
unless there’s actually something to display.