5

Thanks in advance for your response.

I would like to assign (as we can do for admin back-office template), assign to user or a group of users a specific template ?

It's possible ?

3

I believe you'd need to write/find a plug-in to fully achieve that. The following question gives a basic framework for such a plugin: https://stackoverflow.com/questions/20049266/how-to-set-a-template-programmatically-using-a-plugin

JFactory::getUser(); would allow you to get the current user's groups, and you would then need to use this information to load the appropriate template. Remember that users can be assigned to multiple groups, so you'd need to work out appropriate logic for such a case.

That said, from a usability perspective, I can't see any reason why you'd want to show different groups a completely different template. That would suggest its completely different site with little shared code.

Making small template changes for each user group is simple enough - you can assign modules on a group-only basis ("Access"), and it's not too hard to add a group-only style sheet that can make any css changes to a shared template if you need to swap colours or anything like that.

1

Regular Labs (formerly NoNumber) has an Advanced Template Manager.

https://www.regularlabs.com/extensions/advancedtemplatemanager

You can choose to assign user groups (free version) or user ids (pro only) to a template.

Works really well. I highly recommend purchasing the lifetime pro package of Regular Labs, it complete's Joomla, in my opinion. Also, Peter is really good at helping people out with support, and he updates his components almost daily, so any bugs encountered are generally resolved immediately.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.