Template change for mobile site
Template change for mobile site
Does CMSMS have any options to automatically load a different template if a mobile browser or resolution is detected? I know there are solutions out there for changing the css depending on the above, but nothing on changing the template.
Re: Template change for mobile site
CGExtentions has that feature, check help text
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Re: Template change for mobile site
Looks to me like I'd have to know how to manipulate smarty or program something to get it to work using CGExtensions.
Re: Template change for mobile site
Isn't that true for anything you'd like to customize in CMSMS?skarni wrote:Looks to me like I'd have to know how to manipulate smarty or program something to get it to work using CGExtensions.
Yes it is. At least a little understanding of smarty is a requirement to get create a page template or news template. Unless you're happy with the default theme as it comes with the installation.
Re: Template change for mobile site
Its easy to utilize the syntax described in help files to modify smarty tags, but creating them without a guide is entirely different. I can easily transform a regular Html template into CMSMS.
Re: Template change for mobile site
skarni wrote:Its easy to utilize the syntax described in help files to modify smarty tags, but creating them without a guide is entirely different. I can easily transform a regular Html template into CMSMS.
Rolf wrote:CGExtentions has that feature, check help text
Simpler than that????CGExtentions help text wrote:{cge_is_smartphone [assign=name]} - function plugin
Description: A plugin to detect wether the request is from a smart phone such as an iphone or android.
i.e: {cge_is_smartphone assign='isbot'}{if $isbot}<h3>I should do some funky mobile styling here.</h3>{/if}

"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
Re: Template change for mobile site
I'll try the link out. The code displayed, as far as I understand, identifies the current device used, but does not include code to tell CMSMS what template to use in response. That's beyond my ability. 

Re: Template change for mobile site
I don't think it's made to change the whole template as they are attached to the page but more like...
{if mobile} don't show this {else} show this {/if}
This would change the template to show more or less or different content to mobile devices so you don't need a new/different template just change what is shown to different devices...
{if mobile} don't show this {else} show this {/if}
This would change the template to show more or less or different content to mobile devices so you don't need a new/different template just change what is shown to different devices...
Re: Template change for mobile site
Currently there is nothing that would make it possible switching complete Template based on device, only way is like DrCSS mentioned by conditional statements in your template.
You can use CGExtensions Module or mobiledetect (http://dev.cmsmadesimple.org/projects/mobiledetect) plugin for which you can also check Help on Github https://github.com/uniqu3/mobiledetect and see if you are capable using or trying it.
In upcomming version 1.11.8 announcement here http://forum.cmsmadesimple.org/viewtopi ... =1&t=67481 you can see that a core event is about to be added that will make it possible to write a module or some other solution for template switching. For example if somebody finds time fixing and updating CMSTouch http://dev.cmsmadesimple.org/projects/cmstouch
You can use CGExtensions Module or mobiledetect (http://dev.cmsmadesimple.org/projects/mobiledetect) plugin for which you can also check Help on Github https://github.com/uniqu3/mobiledetect and see if you are capable using or trying it.
In upcomming version 1.11.8 announcement here http://forum.cmsmadesimple.org/viewtopi ... =1&t=67481 you can see that a core event is about to be added that will make it possible to write a module or some other solution for template switching. For example if somebody finds time fixing and updating CMSTouch http://dev.cmsmadesimple.org/projects/cmstouch