如何自定义SharePoint 2010移动视图 [英] How to customize SharePoint 2010 mobile view

查看:112
本文介绍了如何自定义SharePoint 2010移动视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直坚持为SP2010发布门户开发移动视图.它面向Internet,带有自定义页面/Web部件(例如 http://server/Pages/customPage.aspx ,其中包含自定义Web部件)它).该网站具有自定义母版页.

我的内置移动功能存在以下问题:

  1. 欢迎页面.导航到 http://server/?Mobile = 1 重定向了我 到 http://server/_layouts/mobile/mbllists.aspx ,它仅显示可用列表/文档库的表格.为了 我的门户网站,我想显示一个 仪表板,就像我目前对常规"非移动视图所做的一样.

  2. 导航到我的自定义之一 页面(例如 http://server/Pages/customPage.aspx?Mobile = 1 ) 也重定向到 http://server/_layouts/mobile/mbllists.aspx .

因此,实际上,根本没有任何有用的内置移动支持.只能使用移动设备查看列表.


因此,我遇到了很多问题,希望能得到一些高级帮助.我的想法是我应该执行以下任务:

  1. 为移动设备创建单独的母版页
  2. 弄清楚如何根据客户端是移动设备吗"来选择此母版页.
  3. 弄清楚如何防止重定向到/_layouts/mobile/mbllists.aspx

然后,我认为移动网站的运行方式与普通网站类似.

我在正确的轨道上吗?


根据我从@moontear的链接以及我所做的其他研究中所看到的,听起来最好的选择是仅禁用内置的SharePoint移动支持,并基于.

解决方案

查看有关如何自定义移动视图的大量MSDN文档:

当您查看该页面时,您会看到您已经可以更改列表表单的布局,也许对您来说已经足够了-但正如您所说的,您想要一个自定义的仪表盘",您可能想研究一下如何移动重定向的工作原理:

您可以通过编辑compat.browse文件来设置将哪台设备视为移动设备,如这篇文章中所述: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.

Am I on the right track?


[Edit]

With what I have seen from links from @moontear and other research I've done, it sounds like my best option is to just disable built-in SharePoint mobile support, and just do my own conditional rendering based off of Request.Browser.IsMobileDevice.

解决方案

Check out the extensive MSDN documentation about how to customize Mobile Views:

when you check out that page you can see that you can already change the layouts of the list forms and maybe that is enough for you - but as you said you want a custom "Dashboard", you probably want to look into how the mobile redirection works:

You can set which device is treated as mobile device by editing the compat.browse file as explained in this post: SP2010 Branding Tip #6 – Mobile Browsers, this way the device you set is shown your regular Sharepoint page (answering your questions 2/3).

这篇关于如何自定义SharePoint 2010移动视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆