tablet option

Sep 26, 2012 at 5:37 PM

Hello,

I understand your module can also redirect a page to a different page/url according to a set of conditions. How can one redirect a page to a mobile device, but not a tablet, for instance? What are the parameters to work with? Perhaps the screen size? Is there an example you can share?

Thanks

Franco

Coordinator
Sep 26, 2012 at 9:21 PM
Edited Sep 26, 2012 at 9:32 PM

Hi Franco,

The used filter for mobile already excludes tablets.

BTW it currently only is a skin object, so you would have to add this to your skin:

Add this to yourASCX skin:
<%@ Register TagPrefix="fortyfingers" TagName="STYLEHELPER" Src="~/DesktopModules/40Fingers/SkinObjects/StyleHelper/StyleHelper.ascx" %>


Then you add one of the following options:

*Redirect the first visit of every session*
During this session redirecting will stop (because of the default value) when you:

    Visit the page from the page redirected to.
    If you add the following querystring parameter to the URL:

<fortyfingers:STYLEHELPER ID="SH1" IfMobile="True" RedirectTo="m.site.com" RedirectMode="Session" runat="server" />

*Redirect the first visit to this page of every session*
During this session redirecting will stop as soons as you revisit the page.
The result is that redirect will only happen once during this browsing session.
<fortyfingers:STYLEHELPER ID="SH1"IfMobile="True" RedirectTo="m.site.com" RedirectMode="Once" RedirectStop="Revisit" runat="server" />


*Always redirect the visitor to the mobile site*
Visiting the regular site with a mobile device is impossible this way.
<fortyfingers:STYLEHELPER ID="SH1" IfMobile="True" RedirectTo="m.site.com" RedirectMode="Always" RedirectStop="Never" runat="server" />

More info on Redirect parameters:
http://www.40fingers.net/WeblogsNews/Weblogs/tabid/58/ID/23/language/en-US/Style-Helper-Skin-Object-Documentation.aspx