Share via


MobileDocViewer (Mobile Document Viewer)

Applies to: SharePoint Foundation 2010

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.

MobileDocViewers (Mobile Document Viewer)
  MobileDocViewer (Mobile Document Viewer)

  <MobileDocViewer ... >  </ MobileDocViewer>

Complex

Attributes and Elements

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 (Mobile Document Viewer)

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 (Mobile Document Viewer)

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

Concepts

Developing Mobile Document Viewers