There is no easy way to change your template with a link, but it is possible with a modified version of the Template Chooser. This is how you can do this:
- Install the Template Chooser module and plugin and make sure they're both published.
- You need the Template Chooser module to be published on your page. If you do not want to see the module, you can remove everything from the file mod_templatechooser/tmpl/default.php. This way you won't see anything from the module on your page, but it will still be there to change the template for you.
- Make a change in the file mod_templatechooser/mod_
if (isset( $_POST["mod_change_template_".
modTemplateChooserHelper::
} else {
if (($keep_cookie == 1)&&(isset($_COOKIE["joomla_template"]))&&
($cur_template != $_COOKIE["joomla_template"])) {
$cookietemplate = $_COOKIE["joomla_template"];
modTemplateChooserHelper::setTemplate($cookietemplate, $keep_cookie);
}
}
to
if (isset($_GET["mod_change_
if ($cur_template !=$_GET["mod_change_
modTemplateChooserHelper::
}
else if (isset( $_POST["mod_change_template_".
modTemplateChooserHelper::
} else {
if (($keep_cookie == 1)&&(isset($_COOKIE["joomla_template"]))&&
($cur_template != $_COOKIE["joomla_template"])) {
$cookietemplate = $_COOKIE["joomla_template"];
modTemplateChooserHelper::setTemplate($cookietemplate, $keep_cookie);
}
}
- you need to know the ID of your module, you can see this in your back-end. Now you can change the template with a link like this:
index.php?mod_change_template_
This name of the template is the same name is the one you see in the backend of the Template Chooser module. The number 68 has to be replaced with the ID of your module.
That should do the trick.