forked from modxcms/evolution
-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Widget for Dashboards (OnManagerWelcomeHome) - remove a default widget #68
Comments
i you use one plugin normal work unset($widgets['security']); but if use more then one better use
|
I only have the default install, and so one plugin, but yes your solution works.... thanks. |
yes i change on pressreleases ) $e = &$modx->Event;
switch($e->name){
case 'OnManagerWelcomeHome':
//if($_SESSION['mgrRole']!=='2') return;
//$widgets['welcome']['hide']='1';
//$widgets['onlineinfo']['hide']='1';
//$widgets['recentinfo']['hide']='1';
//$widgets['news']['hide']='1';
//$widgets['security']['hide']='1';
$widgets['test'] = array(
'menuindex' =>'1',
'id' => 'test',
'cols' => 'col-sm-6',
'icon' => 'fa-rss',
'title' => 'test',
'body' => '<div class="card-body">[+modx_news_content+]</div>',
'hide'=>'0'
);
$e->output(serialize($widgets));
break;
} |
why does not work for me?
event: OnManagerWelcomeHome what i'm doing wrong? evo v 1.3.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Should I be able to remove a widget yet, or is this still work in progress?
From a simplified version of the example code a plugin for the OnManagerWelcomeHome event:
$e = &$modx->Event;
switch($e->name){
case 'OnManagerWelcomeHome':
unset($widgets['security']);
break;
}
But it does not remove the widget. Looking at the code here https://github.com/evolution-cms/evolution/blob/develop/manager/actions/welcome.static.php#L357 it is merging custom widgets, so as far as I can see the default ones will always be on the dashboard?
The text was updated successfully, but these errors were encountered: