1

I am stuck on developing a mobile view for my SP2010 publishing portal. It is Internet-facing with custom pages / web parts (e.g. http://server/Pages/customPage.aspx with custom webparts on it). The site has a custom master page.

I am having the following issues with the built-in mobile functionality:

  1. The welcome page. Navigating to http://server/?Mobile=1 redirects me to http://server/_layouts/mobile/mbllists.aspx, which just shows a table of lists / document libraries available. For my portal, I want to show a dashboard, just like I currently do for the "normal" non-mobile view.

  2. Navigating to one of my custom pages (e.g. http://server/Pages/customPage.aspx?Mobile=1) also redirects to http://server/_layouts/mobile/mbllists.aspx.

So in effect there is really no helpful built-in mobile support at all; just the ability to view lists with a mobile device.


So I have a number of issues and I'm hoping for some high-level help. My thought is that I should do the following tasks:

  1. Create a separate master page for mobile
  2. Figure out how to choose this master page based on "is client a mobile device?"
  3. Figure out how to prevent the redirection to /_layouts/mobile/mbllists.aspx

Then I think the mobile site will operate similarly to the normal site.

What do you think? Am I on the right track?


This is a cross post with Stack Overflow; I realize this site is more specific to SharePoint, but SO has a bigger community so I do not find it redundant.

1 Answer 1

3

Randy Drisgill has an article about mobile views. Basically any smartphone should be able to view the site normally. You just need to manipulate the App_Browsers compat file.

C:\inetpub\wwwroot\wss\VirtualDirectories\portal.contoso.com80\App_Browsers\compat.browse

This file has settings for MANY popular browsers, including most mobile browsers. In my example I want to change the mobile setting for the iPhone browser so I found this section:

<!-- iPhone Safari Browser --> <!-- sample UA "Mozilla/5.0 (iPhone; U;
 CPU iPhone OS 2_0 like Mac OS X; ja-jp) AppleWebKit/525.18.1 (KHTML,
 like Gecko) Version/3.1.1 Mobile/5A345 Safari/525.20" --> <browser
 id="iPhoneSafari" parentID="AppleSafari"> <identification> <userAgent
 match="iPhone" /> <userAgent match="Mobile" /> </identification>
 <capabilities> <capability name="isMobileDevice" value="true" />
 <capability name="canInitiateVoiceCall" value="true" /> <capability
 name="optimumPageWeight" value="1500" /> <capability
 name="requiresViewportMetaTag" value="true" /> <capability
 name="supportsTouchScreen" value="true" /> <capability
 name="telephoneNumberDetectionDisabled" value="true" />
 </capabilities> </browser>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.