編輯

共用方式為


BrowserCondition element (Mobile Document Viewer)

Applies to: SharePoint 2016 | SharePoint Foundation 2013 | SharePoint Online | SharePoint Server 2013

Identifies a browser condition under which redirection to a page that hosts a viewer for a specified type of document is overridden because the device can use an alternative viewer for the specified type of file, possibly a viewer that is installed on the device.

  <BrowserCondition ... >
 </BrowserCondition>

Elements and attributes

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description
Id
The name of a browser capability in the compat.browser file.
Value
True if the presence of the capability means that redirection is overridden; otherwise, false.

Child elements

Element Description
Override
Specifies an alternative redirection URL.

Parent elements

Element Description
MobileDocViewer
Specifies redirection of a request for a document from a mobile device.

Example

The following example shows this element in use.

<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>

See also