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!
Mobile Subdirectory
Mobile Subdirectory
Last edited by CGrouse on Tue Nov 18, 2014 9:22 am, edited 2 times in total.
Re: Mobile Subdirectory
I have Full Source code if that helps
- ForumsAdmin
- AbleCommerce Moderator
- Posts: 399
- Joined: Wed Mar 13, 2013 7:19 am
Re: Mobile Subdirectory
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
Where is UrlHelper.IsMobileRequest located?
Re: Mobile Subdirectory
It's in the CommerceBuilder\Utility\UrlHelper.cs file of the Able source.
Re: Mobile Subdirectory
thanks! I gave to our web coder