MobileDocViewer element (Mobile Document Viewer)

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

Specifies how a request for a document for a specific type is redirected to a page that hosts a viewer that can open documents of that type.

  <MobileDocViewer ... > </MobileDocViewer>

Elements and attributes

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

Attributes

Attribute Description
Name
The file name extension on files of the type that can be opened in the viewer.
FilePath
The website-relative path to the page that hosts the viewer.
FeatureId
Optional. The GUID of the Feature, if any, that was used to deploy the viewer page.
QueryId
The query ID key; for example, "doc".
AppendSourceUrl
True if a source query ID should be appended to the URL of page that hosts the viewer; otherwise, false. The source query value is the path to the folder that holds the document. In the special case where "?mobile=1" is part of the original URL, the source query value is the same as the source query value of the original URL.

Child elements

Element Description
BrowserCondition
Optional. Identifies a browser capability that means the browser can use an alternative viewer for the specified type of file.

Parent elements

Element Description
MobileDocViewers
Specifies the document viewing page for one or more types of documents.

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