I should note that this is on revo 2.1
Using this plugin:
https://github.com/jkenters/modMobile
(pastebin version of the main plugin page)
http://pastebin.com/Qxz43Z5k
The plugin detects the useragent, then uses $modx->resource->set(’template’,
to set the mobile template.
The event the plugin was tied to was "onLoadWebDocument"
The problem appeared to be that this was getting cached, so if you clear the cache, visit the site with a mobile user agent, it gets set, but then if you visit with a desktop user agent, it is still set to mobile.
I added the event "onLoadWebPageCache" as well, but it doesn’t seem to fix the caching problem.
This still happens even if all caching is disabled.
Is this the wrong use of $modx-resource->set(’template , is there something else we should be using instead?