Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.



Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.


Having different templates for different users

Having different templates for different users

I would like to have the facility where I can allow different frontend users to select different templates for my website ie. see my website in milkyway or purity etc. Once selected they will view the website in that template only unless changed later that choice will probably be saved in the database. Is this possible ? and if so then how?

Beginner Modder
1 Posts
Administrator has disabled public posting

Re: Having different templates for different users

Hi bleustreak,

For front-end choice of templates I'd use one of the modules available in the Joomla Extensions Directory for this purpose:

e.g. Template Selector http://extensions.joomla.org/extensions … ating/7466
e.g. Template Chooser http://extensions.joomla.org/extensions … ating/2401  (sadly unavailable at the moment)

I think these both store the template selection in a cookie.

Alternatively, it's not that hard for a Joomla programmer to make a module that would fit in with MetaTemplate and use MetaTemplate to trigger the template change, and optionally write the selection to the database. On the front end you'd just rewrite the current URL to include a string such as "&template=XXXX" (or put that in a POST variable) then list a series of templates with these URLs. In MetaTemplate you would detect the "template" URL parameter and use this to switch to that template.
To store the template choice per user you might need to piggyback on a component like CommunityBuilder, JomSocial, VirtueMart, or some other component that allows you to add extra data fields for users. Then you just write the data into the appropriate table.

Hope that helps,

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

3329 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
Total Topics:
Total Polls:
Total Posts:
User Info:
Total Users:
Newest User:
Members Online:
Guests Online:

There are no members online

Forum Legend:

 New Sticky