If you want to avoid collisions with other settings and get only Context Settings, I think you can use this:
$value = $modx->context->getOption('setting_key', null, 'default');
The default value will be used if the Context Setting doesn't exist.
If you need settings from a particular context that might not be the current context:
$key = 'web' /* or whatever */
$ctx = $modx->getContext('key');
if ($ctx) {
$value = $ctx->getOption('setting_key', null, 'default');
} else {
/* context doesn't exist */
}
------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using.
MODX info for everyone:
http://bobsguides.com/modx.html
[ed. note: BobRay last edited this post 14 years ago.]