Well, I can’t seem to get setOption to set a value at all. A few questions...
1. Should it be sufficient to use switchContext and then immediately start setting options for that context?
case 'www.mysite.com':
$modx->switchContext('contextForMySite');
$modx->setOption('setting1', 'Value1');
$modx->setOption('setting2', 'Value2');
break;
2. If there are defaults for the option in system settings and context setting, which loads last (system, context, gateway)?
I’ve tried setting the defaults null. If the context setting is null, the default system setting gets used (not the gateway setOption). If the system setting is null, then the value is null when the resource calls the option [[++setting1]].
3. Does the option need to exist as a system or context setting prior to using setOption? I am assuming so or there would be nothing to set.
Thanks,
-Brian