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?
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Re: User agent deciding which Template to use?
Thanks Rolf, much appreciated.
I wasn't able to get the UDT tag working, but was able to use the method described combined with the mobiledetect plugin to display different templates depending on the user-agent.
My only concern however is page loading speed - essentially now each template is two templates (mobile / desktop).
Is this the best or recommended way to load templates depending on the device used?
I was actually on Goran's site yesterday and didn't even notice this article, so thanks again.
Cheers,
Paul
I wasn't able to get the UDT tag working, but was able to use the method described combined with the mobiledetect plugin to display different templates depending on the user-agent.
My only concern however is page loading speed - essentially now each template is two templates (mobile / desktop).
Is this the best or recommended way to load templates depending on the device used?
I was actually on Goran's site yesterday and didn't even notice this article, so thanks again.
Cheers,
Paul
Re: User agent deciding which Template to use?
CMSMS requires you to have one and only one template per content page. So you can not have a separate mobile template and a desktop template.
The method mentioned above is good (else it wouldn't even be on that blog). Page loading will not suffer from this method because the webserver will ONLY serve the content for the specific device.
The webserver (php engine) will, however, need to parse a slightly larger template, but I guess that will not really influence the overall speed of the website.
The method mentioned above is good (else it wouldn't even be on that blog). Page loading will not suffer from this method because the webserver will ONLY serve the content for the specific device.
The webserver (php engine) will, however, need to parse a slightly larger template, but I guess that will not really influence the overall speed of the website.



