Created
June 17, 2017 21:52
-
-
Save Dmi3yy/d065729c3c37eb3f17eab247ae1dd10d to your computer and use it in GitHub Desktop.
sample widgets for modx evo. 1.2.1-d9.1.6 +
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//<? | |
$e = &$modx->Event; | |
switch($e->name){ | |
case 'OnManagerWelcomeHome': | |
//if($_SESSION['mgrRole']!=='2') return; | |
//unset($widgets['welcome']); | |
//unset($widgets['onlineinfo']); | |
//unset($widgets['recentinfo']); | |
//unset($widgets['news']); | |
//unset($widgets['security']); | |
$widgets['test'] = array( | |
'menuindex' =>'1', | |
'id' => 'test', | |
'cols' => 'col-sm-6', | |
'icon' => 'fa-rss', | |
'title' => 'test', | |
'body' => '<div style="max-height:200px;overflow-y: scroll;">[+modx_news_content+]</div>' | |
); | |
$e->output(serialize($widgets)); | |
break; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment