Created
November 8, 2017 15:58
-
-
Save bwente/457e10bc899d601b72c10bdf388ea113 to your computer and use it in GitHub Desktop.
Snippet to update a MODX system setting
This file contains hidden or 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 | |
$setting = $modx->getOption('setting', $scriptProperties); | |
$value = $modx->getOption('value', $scriptProperties); | |
$systemSetting = $modx->getObject('modSystemSetting', $setting); | |
$systemSetting->set('value',$value); | |
$systemSetting->save(); | |
$modx->reloadConfig(); | |
return true; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment