Ok so I'm having problems with changing System Settings on the fly. Some of the contexts are multilingual with language folders containing translated content. I'd like to be able to set a site_start setting dynamically, depending on the detected/requested language.
I've set the site_start System Setting to '0', then in my Gateway plugin I have code that handles routing to the correct language folder.
I'm trying to set site_start on every page load like this, in my plugin:
$langFolderId = 300; // for example
$modx->setOption('site_start',$langFolderId);
However the site_start placeholder always shows '0' instead of '300', even called uncached:
I've tried firing this on all available front end events, and also within a snippet and the placeholder always shows the cached value.
However if I create an uncached snippet containing this:
return $modx->getOption('site_start');
It shows the new value (300).
Is this going to be possible to achieve or should I just use $modx->toPlaceholder('site_start',$value) instead?
[ed. note: okyanet last edited this post 11 years, 9 months ago.]