I'm updating a client site and whilst it will be a responsive design, I was hoping there would be a way for mobile users to be receive a different template to tablet and desktop users?
I installed the Mobiledetect plugin, and whilst it can identify mobile users, my smarty skills are crap, and so I’m not sure how to get it to send users to designated templates.
I'm doing this as desktop has to be IE 8 compatible, but I want mobile to use an Off canvas navigation. I also just want to know how to do it.
Any advice appreciated.
User agent deciding which Template to use?
Re: User agent deciding which Template to use?
Easiest might be to use generic templates for the parts that are different, and keep both on the same master template. So something like this in your master template (possibly edited to work with your mobiledetect plugin):
Code: Select all
{if $mobile}
{include file="cms_template:mymobiletemplate}
{else}
{include file="cms_template:mydesktoptemplate}
{/if}
Not getting the answer you need? CMSMS support options