How to install
To install Digi Template Switch Pro, go to under Joomla! extensions manager, choose to upload a package file and select Digi Template Switch Pro package file (plg_digi_template_switch_pro.zip).
After installation you must activate the plugin. You can find it in Joomla plugins manager.
How to setup
This plugin has two kinds of configurations: Normal and Custom filters.
The first is the easiest to configure, just few buttons to click and templates to select and you are ready.
On plugin settings you have these options to configure:
- Switch for devices allows you to switch the template only for selected kind of devices (smartphones, tablets, all).
- Switch for os allows you to switch the template only for selected operating system (iOS, Android, Windows Phone, all).
- Switch for browser allows you to switch the template only for selected browser (Internet Explorer, FireFox, Chrome, Safari, Opera, all).
- Switch homepage template allows you to select two more templates, one for smartphones and one for tablets, to use only in homepage.
- Switch subpages template allows you to select two more templates, one for smartphones and one for tablets, to use only in selected pages.
For example, take this scenario: display Template-A on smartphones, Template-B on tablets, Template-C on smartphones and tablets in homepage, Template-D on smartphones and tablets in selected pages.
To achieve this result, you must select Template-A as smartphones template, Template-B as tablets template, Template-C as smartphones and tablets templates for homepage and Template-D as smartphones and tablets templates for selected pages.
You can select pages by entering menu IDs separated by comma in the proper field.
If you experience some issues with the plugin functionality, you can try to change Plugin trigger option. As well as you can reorder the plugin in the first position by Set plugin ordering switch, to ensure that no other third-party plugin overrides its functionality.
Custom filters
This plugin has two kinds of configurations: Normal and Custom filters.
The second is more advanced and needs few time more to be configured. It allows to create custom filters to select a template in some conditions, another template in some other conditions and so on.
To let it runs, first you have to turn on the custom filter switch. Remember that with custom filters active, all other options will be ingored by the plugin.
By custom filters you can choose to switch Joomla template for a specific kind of mobile device, for a specific os, for a specific browser or for a specific page of your website.
You can use these tags:
- To select a specific operating system: {os=ios} {os=android} {os=windowsphone}
- To select a specific browser: {browser=ie} {browser=firefox} {browser=chrome} {browser=safari} {browser=opera}
- To select the kind of devices: {device=smartphone} {device=tablet}
- To select a page {itemid=your_item_id}
- To select a template {template=your_template_name}
Simply copy and paste those tags in the proper text area, and separate each filter by comma (a filter is a set of tags).
Please remember that custom filters function is still in beta.
If you experience troubles to setup custom filters, you can turn on debug.
It prints, on frontend, all detected data used by this plugin to switch or not the template.
As last, each filter printed by debug, shows the result of all variables (if template is switched or not).
Backup
Backup function allows you to save, load or delete settings configurations.
This is useful when you need to try some settings but you don't want to lose your current configuration.
Use save function to store the current extension settings in a json file. If the name you choose already exist in the list, the corresponding file will be overwritten.
Save function is asynchronous, so the page is not reloaded on the button pressing.
Settings configurations will be saved as json file, placed in "/settings" folder, inside the extension folder.
Use load function to backup load settings from a file.
Use delete function to remove selected configuration file. After this operation, deleted file can't be recovered.