Jump to:

10850 Posts in 2517 Topics by 1793 members

All other Modules

SilverStripe Forums » All other Modules » Mobile Site Link for redirection

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 566 Views
  • Scott Farmer
    Avatar
    Community Member
    35 Posts

    Mobile Site Link for redirection Link to this post

    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

  • Scott Farmer
    Avatar
    Community Member
    35 Posts

    Re: Mobile Site Link for redirection Link to this post

    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

    566 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.