Ok, I installed it!
1. Function eregi() is deprecated as of PHP 5.3.0
so replaced it with stristr()
2. Then I have to(!) use the _tags_ in my template
<mobile>
mobil template
</mobile>
<standard>
standard template
</standard>
The node id’s are only the names; the $_GET / URL params.
3. I now update my template to this
<mobile>
[!template?option=`[*TemplateOption*]`!]
</mobile>
<standard>
standard template
</standard>
+ Install my first snippet (make sure no space after <<<TPL ) above and create a text tv: "TemplateOptions" and assign it.
4. This works fine!
5. Removing snippet creating 3 chunks:
{{iphone01}} {{iphone02}} {{default}}
6. Changing the TV
input options:
{{iphone01}}||{{iphone02}}||{{default}}
Default option: {{default}}
Type: DropDown List Menu.
and in template only ...<mobile>[*TemplateOption*]</mobile>
7. Client are now being able to change template
per resource, for those resources
the plugin have detected to be mobile.
// I can’t see how this plugin would work for you, if you DON’T use the tags in you MODx template...
Coding this into the Plugin is possible.
But no additional code is needed!!
ONE single TV is all you need. Then this one TV can use chunks, files or even other resources
as templates... //turn off cookie usage when testing.