+1-888-365-2779
Try Now
More in this section

Forums / Suggestions / mobile pc - pda browsing

mobile pc - pda browsing

14 posts, 0 answered
  1. Vangelis
    Vangelis avatar
    153 posts
    Registered:
    07 Jan 2006
    28 Sep 2007
    Link to this post
    Hi,

    Since many people are using mobile pc or pda while out of office it would be nice sitefinity to optimize for such browsers and displays. I've check both sitefinity.com and telerik.com and the result was not so good in reading. In microsoft.com the blocks of a page are displayed one below the other and it is very readable. Dotnetnuke keeps same structure as running page.

    Best regards

    Vangelis
  2. Pepi
    Pepi avatar
    981 posts
    Registered:
    28 Oct 2016
    28 Sep 2007
    Link to this post
    Hello Vagelis,

    Thanks a lot for the suggestion. We will definitely put this issue in our TODO list for future releases.

    Best wishes,
    Pepi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    13 May 2008
    Link to this post
    was any progress ever made with this? I've had some success in just using a different theme and overriding a lot of the css. the only problem I have run into is that I have to change the theme on pre_init which means that I'd have to override the base class from which the pages inherit. I assume you're already doing that so it might complicate things...

    what if you gave us an option in the admin, where you normally choose a page theme for a page, and add a second box for "Choose Mobile Theme" so that if a device identifies itself as a mobile device, it will be presented the alternate theme.
  4. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    14 May 2008
    Link to this post
    i was thinking it would probably be a good idea to have an alternate master page template as well, since mobile layouts might need a different overall structure as well as a different theme.

    are we able to override or access the pre-init of sitefinity pages to detect for mobile devices and change the theme? I know how to do it in a regular asp.net website, but not sure if it's the same thing in sitefinity.
  5. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    14 May 2008
    Link to this post
    well i found this thread which has a great example of how to change the theme :) i'm guessing this should let me change the master page as well.

    this is gonna be fun. i'll report back my experiences

  6. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    14 May 2008
    Link to this post
    totally works! I made the custom class inherited from the telerik base page and overrode the preinit using the wurfl library and BAM my pda loaded the mobile theme (AND the separate mobile.master page) right up while the desktop browser runs the standard theme.

    very cool! now i have a few hours of css hacking to do for the new mobile theme...

    if anyone's interested here's how I do the check for mobile and theme switch:

    using System;  
    using System.Data;  
    using System.Configuration;  
    using System.Web;  
    using System.Web.Security;  
    using System.Web.UI;  
    using System.Web.UI.HtmlControls;  
    using System.Web.UI.WebControls;  
    using System.Web.UI.WebControls.WebParts;  
     
    /// <summary>  
    /// Summary description for DetectingPage  
    /// </summary>  
    public class DetectingPage : Telerik.Cms.Web.InternalPage  
    {  
        protected override void OnPreInit(EventArgs e)  
        {  
            base.OnPreInit(e);  
     
            bool isMobileDevice;  
            try 
            {  
                wurflApi.deviceFileProcessor proc = new wurflApi.deviceFileProcessor(Server.MapPath("/wurfl.xml"));  
                wurflApi.capabilitiesGetter api = new wurflApi.capabilitiesGetter(ref proc);  
                api.prepareNavigatorModelCapabilities(Request);  
                isMobileDevice = bool.Parse(api.getCapability("is_wireless_device"));  
            }  
            catch 
            {  
                isMobileDevice = Request.Browser.IsMobileDevice;  
            }  
     
            if (isMobileDevice)  
            {  
                Page.Theme = "Mobile";  
                Page.MasterPageFile = "/App_Master/Mobile.master";  
            }  
        }  
    }  
     
     
  7. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    15 May 2008
    Link to this post
    Hi SelArom,

    It's great to hear that you managed to get it to work! We don't have this functionality built-in, but we will reference this scenario to every one else who needs this. By the way, here's the link where we discuss the dynamic change of the themes (the one you have provided is broken).

    We would like to thank you for contributing this great tip as well as the wurfl library reference. We have updated your telerik account for that.

    Best wishes,
    Georgi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  8. Pierre
    Pierre avatar
    433 posts
    Registered:
    16 Feb 2006
    15 May 2008
    Link to this post
    Hi SelArom,

    Could you explain more how implement this solution and where?.
    Add you this code in your home master page as codebehind?

    Very nice job. Thanks.

    Regards
  9. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    15 May 2008
    Link to this post
    the code goes in the App_Code/CUSTOM_PAGE.cs where CUSTOM_PAGE is the class file for the page from which you are inheriting the telerik.cms.web.internalpage

    create a class and add it to your App_Code folder in the root directory of sitefinity and place that code in there.

    then open up ~/sitefinity/cmsentrypoint.aspx and change the Inherits line to match the name of your CUSTOM_PAGE class. now every page that is loaded will inherit from the CUSTOM_PAGE class and execute the OnPreInit command

    hope that is helpful!
  10. Pierre
    Pierre avatar
    433 posts
    Registered:
    16 Feb 2006
    16 May 2008
    Link to this post
    Great work. Could you continue with the next step how to make the page for devices and change the configuration of cmspage based in our devicemodel ppc/phone like the referent website. Regards
  11. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    16 May 2008
    Link to this post
    i'm not quite sure what you mean but I'll try do be as helpful as I can.

    you need to define a mobile.master template that is mobile compliant, as well as a theme that will render everything properly. asp.net controls are supposed to render according to the device... you can also use control adapters to modify the output. i haven't got that far yet, so I can't be much help there. google control adapters or also css friendly for more information.
  12. bnye
    bnye avatar
    332 posts
    Registered:
    22 Sep 2005
    24 May 2008
    Link to this post
     if (isMobileDevice && !isIPhone)

    JK thanks for great tip.
  13. Pierre
    Pierre avatar
    433 posts
    Registered:
    16 Feb 2006
    25 May 2008
    Link to this post
    Hi Ben,

    Could you complete the tip with complete source for IPhone?. Have you one another sol. to select the handset and changing models?. Regards
  14. bnye
    bnye avatar
    332 posts
    Registered:
    22 Sep 2005
    25 May 2008
    Link to this post
    Pierre -

    I was just kidding. Pointing out that most (read compliant) Sitefinity sites will look great on the iPhone "as is". But I did a quick google and found this...

    Public Shared Function IsIPhoneUser() As Boolean    
        Return HttpContext.Current.Request.UserAgent.ToLower.Contains("iphone")     
    End Function  
     
    Hope that helps. There is also a Telerik blog post on how different Tererik controls look on the IPhone.

    http://blogs.telerik.com/SearchResults.aspx?IndexCatalogue=Blogs&SearchQuery=Iphone

    Also, if you want to read a funny review of the IPhone check out this Not Safe For Work:

    http://www.thebestpageintheuniverse.net/c.cgi?u=iphone

    Sincerely,

    bnye
Register for webinar
14 posts, 0 answered