Created
June 22, 2012 15:05
-
-
Save netProphET/2973318 to your computer and use it in GitHub Desktop.
plugin fragment for setting width of MODX Manager left panel
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
<?php | |
/** | |
* plugin fragment for setting width of MODX Manager left panel | |
*/ | |
if($modx->event->name == 'OnBeforeManagerPageInit') { | |
// update layout manager state | |
$state = $modx->controller->getDefaultState(); | |
$state['modx-leftbar-tabs']['width'] = 525; | |
$response = $modx->runProcessor('system/registry/register/send',array( | |
'register' => 'state', | |
'topic' => '/ys/user-'.$modx->user->get('id').'/', | |
'message'=> $modx->toJSON($state), | |
'message_key'=> '', | |
'message_format'=> 'json', | |
'delay'=> 0, | |
'ttl'=> 0, | |
'kill'=> 0, | |
)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following bit of javascript executed seems an alternative yet not exactly pretty method to do the same: