Adding a drop-down template changer in Joomla!

You can install many templates for a Joomla! site. However, by default the site administrator can change the template for the whole site. You can also allow the visitors to select a template from the list of installed templates. In this recipe, I am going to show you how to add a drop down template chooser to your Joomla! website.

Getting ready…
Template Chooser is a popular extension that allows visitors to choose a template. Download this extension from http://www.ultijoomla.com/downloads?func=startdown&id=5, and extract the compressed file. You get two installation files:  mod_templatechooser.zip and plg_templatechooser.zip.  Install both the files from Extensions | Install/Uninstall screen.

How to do it…
When done installing the module and plugin, follow the steps below:
1.    From Joomla! administration panel, click Extensions | Plugin Manager. That shows Plugin Manager screen listing all installed plugins.  From the list click on Template Chooser plugin, and that shows Plugin:[Edit] screen. Select Yes in Enabled field, and click Save icon in the tool bar.
2.    Now click Extensions | Module Manager. That shows Module Manager screen listing all installed modules. From the list, click on Template Chooser module. That shows Module:[Edit] screen.

3.    Type a title for the module in Title field, for example ‘Choose a template’. Then select Yes in Show Title and Enabled fields. From the Position drop down list, select the module position where you want to display this module. 
4.    From Module Parameters section, select Show in Show Preview field. Then specify Width and Height for preview. You see the list of available templates. Select Show radio button if you want to show these template. If you don’t want to show a particular template, select No radio button beside the name of that template. Select Yes in Keep Cookie field. Click Save icon in the tool bar.
5.    Preview the site’s front-end and you see the module at the position you specified.

 

6.    In the module, you see a preview of selected template, a drop down box for select a template and a Select button. When visitors select a template form the drop down list, its preview display just above the drop down list. And clicking Select button will apply that template to the site.

When using a template chooser for visitors, you need careful planning of your site. First, you should ensure that all the modules you have placed on different positions will be displayed consistently in all templates. Second, ensure that no information will be missing due to changing the template. And finally, ensure that your site’s branding remain intact even when the template is changed by the visitor.

Advertisements

2 thoughts on “Adding a drop-down template changer in Joomla!

  1. Hello Suhreed,

    I am just about to buy your book on ecommerce with virtuemart from pact publishing. I just want to make a quick enquiry, if I want to create an online bookstore, should I buy a virtuemart template or a joomla template? I really dont have much experience with both.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s