|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.|
View Element (Module)
This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
Describes a view within a module for a site definition.
<View AggregateView = "TRUE" | "FALSE" BaseViewID = "Integer" DefaultView = "TRUE" | "FALSE" DisplayName = "Text" FailIfEmpty = "TRUE" | "FALSE" FileDialog = "TRUE" | "FALSE" FPModified = "TRUE" | "FALSE" FreeForm = "TRUE" | "FALSE" Hidden = "TRUE" | "FALSE" List = "Integer" | "Text" Name = "Text" OrderedView = "TRUE" | "FALSE" PageType = "Text" Path = "Text" ReadOnly = "TRUE" | "FALSE" RecurrenceRowset = "TRUE" | "FALSE" RowLimit = "Integer" Scope = "Text" ShowHeaderUI = "TRUE" | "FALSE" Threaded = "TRUE" | "FALSE" Type = "HTML" | "Chart" | "Pivot" Url = "URL"> </View>
Optional Boolean. TRUE to specify that the view is a Merge Forms view used in an XML Form library. By default, an XML Form library is provisioned with a Merge Forms view that is initially hidden. When an XML editor is used to publish an XML Form Properties (XFP) file to the Forms directory of the library along with a template used by the editor, the AggregateView attribute identifies the Merge Forms view, which can be made visible or hidden depending on whether the list template or definition for the library supports data merging.
Optional Integer. Specifies the ID of the base view.
Optional Boolean. TRUE to specify that the view is the default view.
Optional Text. Specifies the name of the view that is displayed on the Quick Launch.
Optional Boolean. If the view returns no items, TRUE to return a blank page and an HTTP error code instead of rendering the ViewEmpty element. Used for programmatic manipulation of views from a client application, preventing the client application from having to parse a document to discover whether the view is empty.
Optional Boolean. TRUE to specify that the view is displayed in file dialog boxes for applications used within the context of Windows SharePoint Services, which parse the output HTML to determine the contents of the list.
Optional Boolean. TRUE if the view has been altered through editing in a Web page editor, and the view is no longer customizable by the Microsoft Windows SharePoint Services UI.
Optional Boolean. TRUE to specify alternate field formatting for certain field types in field rendering. In particular, this affects the alignment of number columns, which is particularly useful in custom nontabular view types.
Optional Boolean. TRUE to hide the view.
Optional Integer or Text. Specifies the type of list. This value can be either the ID of the template for a list (an integer), or the URL to a list provisioned in the site (a string). Best practice is to use Text, because Integer might not be specific enough (e.g., if there are two announcements lists in the site and you specify List=104).
Optional Text. The name given to the view (used to select a different named view in the UI as well as to refer to a named view in specifying a filter for a Lookup field).
Optional Boolean. TRUE to specify that the view is ordered.
Optional Text. Specifies the type of form in which the view is used. Possible values include the following:
Optional Text. Specifies the file name for the view.
Optional Boolean. TRUE to make the view read-only.
Optional Boolean. TRUE to expand recurring events in the view and display each instance of each recurring event. The default value is FALSE.
Optional Integer. Applies to the HTML view type only. Specifies the maximum number of rows to render on any one page. When the row limit is exceeded, the next and previous buttons on the page allow for viewing other parts of the returned recordset.
If RowLimit is not specified, the default number of Rows returned is 50. If "None" is specified for the view type, all the rows of the recordset are returned in one view.
When a view is rendered, the render variables ViewHasNext and ViewHasPrev are set to TRUE or FALSE, based on whether the current view has reached the row limit from the dataset. These variables can be used in successive page definitions to render Next and Previous buttons on the page, as in the following example:
<Switch> <Expr><GetVar Name=”ViewHasPrev”/></Expr> <Case Value=”TRUE”> <![CDATA[...Previous button defined here... ]]> </Case> </Switch>
The variables NextPageURL and PrevPageURL are also set to nonblank values when there is forward or backward paging content from the current display. These variables can be used by constructing the Next and Previous buttons to have the correct URL for accessing the next page of content.
Optional Text. Specifies the recursive scope for a view of a document library. Possible values include the following:
Optional Boolean. FALSE to render all FieldRef elements used in the header display mode without decorating the UI with HTML. In other words, when this mode is set, the UI does not provide sorting and filtering as hyperlinks in the column header. The default value is TRUE.
Optional Boolean. TRUE to apply inner grouping in the view. A threaded view is constructed based on the built-in threading column (assumed to exist for the list). The view is sorted on this field as the secondary sort. If other columns in the view are specified as sorted or grouped, those are applied before the threading column sort order. As a result, all discussions grouped by a topic can be collected together, and the message threading can be displayed beneath the collection.
When TRUE, the RowLimit element has a different meaning when used on a threaded discussion board list view. Instead of specifying the number of items to return, it specifies the number of discussion threads to return, where a thread could consist of one or more items. In addition to having the Threaded attribute set to TRUE, a threaded view must be sorted by the thread ID; otherwise, this row limit behavior does not take effect.
Optional Text. Specifies the rendering type of the view. The type is the common enumerated HTML view and can be set to HTML, Chart, or Pivot.
Optional URL. Specifies the URL for the view.