Force template selection using PHP
Posted: Tue 27. Jul 2010, 21:20
Can I overide the template that is allocated to each section of the site structure by using raw PHP?
For example, say I added a script that detected the Opera browser. Could I then change the homepage template from 'example_template' to 'opera_template' using a conditional statement like:
(I know those variables don't really exist)
I use another CMS where the theme can be set in a link if required, e.g.
So I wondered if this was possible with PHPWCMS ?
For example, say I added a script that detected the Opera browser. Could I then change the homepage template from 'example_template' to 'opera_template' using a conditional statement like:
Code: Select all
if($isOpera){
$template = 'opera_template'
}
I use another CMS where the theme can be set in a link if required, e.g.
Code: Select all
index.php?theme=opera_theme