BrowserCondition 元素 (移动文档查看器)

适用于: SharePoint 2016 |SharePoint Foundation 2013 |SharePoint Online |SharePoint Server 2013

确定浏览器条件,依据此条件替代到承载用于指定类型文档的查看器的页面的重定向,因为此设备可对指定类型的文件使用替代查看器(可能是设备上安装的查看器)。

  <BrowserCondition ... >
 </BrowserCondition>

元素和属性

下面各部分介绍了属性、子元素和父元素。

Attributes

属性 说明
Id
文件中浏览器功能 compat.browser 的名称。

如果功能的存在意味着重定向被重写,则为 True;否则为 false

子元素

元素 说明
Override
指定替代重定向 URL。

父元素

元素 说明
MobileDocViewer
指定移动设备发出的文档请求重定向。

示例

下面显示的是此元素的使用示例。

<MobileDocViewers>
  <MobileDocViewer Name="docx" FilePath="/_layouts/mobile/mWord.aspx" FeatureId="8DFAF93D-E23C-4471-9347-07368668DDAF" QueryId="doc" AppendSourceUrl="true" >
    <BrowserCondition Id="overrideMobileDocViewerRedirection" Value="true">
      <Override FilePath="/_layouts/MobileDocHandler.ashx" AppendSourceUrl="false" />
    </BrowserCondition>
  </MobileDocViewer>
</MobileDocViewers>

另请参阅