MODX EXTRA
Mobile Template Switcher
Creator: digitALPS (digitalps)
1.0.0-beta (17 KB) Other Versions Need help installing this extra?About Mobile Template Switcher
Detects mobile browsers and uses a mobile template to render the page. Switch templates either on a page-by-page basis, or using cookies to save the user's template choice for a sitewide template change.
I used the plugin TemplateSwitcher and added the mobile browser detection script from detectmobilebrowsers.mobi.
Information
Instructions
Create a new plugin and copy the code from the MobileTemplateSwitcher.plugin.txt file. Set its System events to OnLoadWebDocument. Set its Configuration to this value: &usecookie=Use Cookie;list;no,yes;no &template=Mobile Template;text;mobile
NOTE: Pages cannot be cached.
To enable/disable sitewide/cookie support, select the configuration value for Use Cookie to yes/no.
Place the name of your mobile template in the configuration, if it is not mobile.
To prevent a document's template being switched, put an HTML comment with the word 'donotswitch' in the document's content.UpdatesUpdated version
New in Mobile Template Switcher 1.0-beta
There are no release notes for this version.