Mobile Subdirectory

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
CGrouse
Lieutenant (LT)
Lieutenant (LT)
Posts: 59
Joined: Tue Jun 10, 2008 12:44 pm

Mobile Subdirectory

Post by CGrouse » Mon Aug 19, 2013 12:00 pm

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!
Last edited by CGrouse on Tue Nov 18, 2014 9:22 am, edited 2 times in total.

CGrouse
Lieutenant (LT)
Lieutenant (LT)
Posts: 59
Joined: Tue Jun 10, 2008 12:44 pm

Re: Mobile Subdirectory

Post by CGrouse » Mon Aug 19, 2013 7:28 pm

I have Full Source code if that helps

User avatar
ForumsAdmin
AbleCommerce Moderator
AbleCommerce Moderator
Posts: 399
Joined: Wed Mar 13, 2013 7:19 am

Re: Mobile Subdirectory

Post by ForumsAdmin » Tue Aug 20, 2013 3:00 am

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;

           ...
           ...
           ...

        }

CGrouse
Lieutenant (LT)
Lieutenant (LT)
Posts: 59
Joined: Tue Jun 10, 2008 12:44 pm

Re: Mobile Subdirectory

Post by CGrouse » Tue Aug 20, 2013 9:08 am

Where is UrlHelper.IsMobileRequest located?

User avatar
david-ebt
Captain (CAPT)
Captain (CAPT)
Posts: 253
Joined: Fri Dec 31, 2010 10:12 am

Re: Mobile Subdirectory

Post by david-ebt » Tue Aug 20, 2013 9:17 am

It's in the CommerceBuilder\Utility\UrlHelper.cs file of the Able source.
David
http://www.ecombuildertoday.com
Enhanced Reporting for AbleCommerce
Image

CGrouse
Lieutenant (LT)
Lieutenant (LT)
Posts: 59
Joined: Tue Jun 10, 2008 12:44 pm

Re: Mobile Subdirectory

Post by CGrouse » Tue Aug 20, 2013 9:34 am

thanks! I gave to our web coder

Post Reply