Hello,
I need to be able to change document template dynamically. I know I could use CSS controled template but it wouldn't really work in my case.
Let say I have a url like www.test.com?tpl=16.
I want to set the template of the document to 16.
Would the following work:
- Create a plugin as below and select the event
OnLoadWebDocument and
OnLoadWebPageCache
$tpl = $_GET['tpl'];
$modx->resource->set('template',$tpl);
Thanks for your help.
[ed. note: eclipseTalk last edited this post 12 years, 2 months ago.]