10389 Posts in 2200 Topics by 1712 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 392 Views |
-
Mobile Site Link for redirection

4 October 2011 at 10:23am
Hi all,
I've setup a site with the latest version of silverstripe and latest version of the mobile module. Works fine on a Iphone / Android, redirections to mobile domain and uses correct mobile theme.
I wanted to test in a normal desktop browser, so I used ?fullSite=0 to view mobile version and ?fullSite=1 to view normal website. This worked fine on dev site local host, but on test server, with mobile domain redirection setup this causes a loop and you can't get out of the mobile version again.
Any hints here would be appreciated.
Thanks
Regards
Scott -
Re: Mobile Site Link for redirection

10 October 2011 at 4:46pm Last edited: 10 October 2011 5:09pm
Update:
It seems to be a issue when you have Mobile site behaviour set to: Mobile users are redirected to mobile domain. Redirects fine to mobile site and displays correct theme. The problem is the fullsite link doesn't work. When you click this it redirects back to fullsite domain, but then redirects back to mobile domain. Works fine if set to " Mobile users see mobile theme, but no redirection occurs". Any ideas?
Solution:
It seems by editing MobileSiteControllerExtension.php, line 71 and adding a check if fullsite cookie has NOT been set, then enable mobile site / theme. It appears to me this function just checks if on mobile site domain, and if true over-rides fullsite cookie.
i.e. if($this->onMobileDomain() || isset($_GET['fullSite'])) {
Thanks
Regards
Scott
| 392 Views | ||
|
Page:
1
|
Go to Top |

