Page 1 of 1

Mobile Subdirectory

Posted: Mon Aug 19, 2013 12:00 pm
by CGrouse
Is there a way to exclude a subdirectory from the mobile theme? In other words we have http://www.firefold.com/blog It works great except when going to it in a iphone.

How can I tell the site not to redirect the blog subdirectory to the "mobile" site.

Thanks!

Re: Mobile Subdirectory

Posted: Mon Aug 19, 2013 7:28 pm
by CGrouse
I have Full Source code if that helps

Re: Mobile Subdirectory

Posted: Tue Aug 20, 2013 3:00 am
by ForumsAdmin
Update UrlHelper.IsMobileRequest method

Code: Select all

        public static bool IsMobileRequest(string url, string appPath, string host, string mobileHost)
        {
            // first check for mobile indicator in url path
            if (string.IsNullOrEmpty(appPath)) appPath = "/";
            else if (!appPath.EndsWith("/")) appPath += "/";
            
            // ADD THIS LINE
            if(url.ToLowerInvariant().StartsWith(appPath.ToLowerInvariant() + "blog")) return false;

           ...
           ...
           ...

        }

Re: Mobile Subdirectory

Posted: Tue Aug 20, 2013 9:08 am
by CGrouse
Where is UrlHelper.IsMobileRequest located?

Re: Mobile Subdirectory

Posted: Tue Aug 20, 2013 9:17 am
by david-ebt
It's in the CommerceBuilder\Utility\UrlHelper.cs file of the Able source.

Re: Mobile Subdirectory

Posted: Tue Aug 20, 2013 9:34 am
by CGrouse
thanks! I gave to our web coder