共用方式為


XSLT Global Parameters

Applies to: SharePoint Foundation 2010

Microsoft SharePoint Foundation implements a main XSLT file (%ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\LAYOUTS\XSL\main.xsl) to declare all the necessary input parameters for use in XSLT transforms. You can implement these global values in custom XSLT files to define list views. For information about how to use these parameters, see XSLT Parameter Bindings.

The following table lists the parameters that are declared in main.xsl.

Name

Description

AddNewAnnouncement

Localized string value for addnewitem that is specified in wss.resx.

AddServerFilterOperationHash

Boolean flag that corresponds to the AddServerFilterOperationHash property of the XsltListViewWebPart class.

ByText

Empty string in SharePoint Foundation 2010. Reserved for future use.

CascadeDeleteWarningMessage

Reserved for future use.

dvt_filterfields

Comma-separated list of filter fields.

dvt_firstrow

Identifier (ID) of the first row in the current page.

dvt_form_key

dvt_nextpagedata

Value that is used in a link to the next page.

dvt_partguid

Same as the WebPartClientID parameter. String value of the UniqueID property of the Web Part.

dvt_prevpagedata

Value that is used in a link to the previous page.

dvt_RowCount

Count of rows in the current page of the view.

dvt_sortdir

Sort order. Value can be either ascending or descending.

dvt_sortfield

Sort field name.

EcbMode

Boolean flag that specifies whether the XSLT transformation is running for edit control block (ECB) drop-down menu rendering.

EnableAlert

Boolean flag that specifies the value that is returned by the BrowserAlertsEnabled() method of the SPPageManager class.

ENCODED_FORM_NEW

New item form page URL in URL-encoded format. The path is absolute. URL encoding is stronger than URL path encoding.

EntityName

External data source entity name.

EntityNamespace

External data source namespace.

ExternalDataListPermissions

External data list permission.

FieldSortParam

String that contains all filter operations.

Filter

Boolean flag that specifies whether the filter drop-down list can contain too many choices in large lists, and whether the view reverts back to HTML drop-down format for performance and scalability reasons.

FilterLink

String that is used in filtering operations as the query string.

FilterLinkNoHost

Empty string in SharePoint Foundation 2010. Reserved for future use.

FORM_DISPLAY

Display item form page URL in URL path-encoded format. The path is absolute.

FORM_DISPLAY_HTMLURLATTRIBUTEENCODED

Display item form page URL in URL attribute-encoded format. The path is absolute.

FORM_EDIT

Edit item form page URL in URL path-encoded format. The path is absolute.

FORM_NEW

New item form page URL in URL path-encoded format. The path is absolute.

FreeForm

Specifies whether the view is FreeForm. Default value is 0, but if FreeForm, set to 1.

GroupingRender

Boolean flag that specifies whether the view is being rendered for grouping callback.

HasRelatedCascadeLists

Boolean flag that specifies whether the current list has a related list and there is at least one related field for the list.

HasTitleField

$XmlDefinition/ViewFields/FieldRef[@Name='Title']

HttpHost

String value of the HTTPHost element.

HttpPath

String value of the HttpVdir element, followed by /_vti_bin/owssvr.dll?CS=65001. This value is URL path-encoded.

HttpVDir

The URL of the current website that contains the list. If the view is cross website, the site is not the one that contains the page, but the one that contains the list.

HttpVDirUniEncoded

URL path-encoded value of the HttpVDir element.

idPresEnabled

Localized string value of idPresEnabled in wss.resx.

InlineEdit

Boolean flag that specifies whether the view is in inline edit mode.

IsDocLib

Boolean flag that specifies whether the view is for a document library.

IsGhosted

Boolean flag that specifies whether the view contains overriding XSL, or whether by default, it uses the SharePoint Foundation server farm-wide XSL that is shared by all default views.

IsHomePageView

Reserved for future use.

IsPostBack

Boolean flag that is set to 1 if the IsPostBack property of the Page class equals true.

LCID

The value of System.Threading.Thread.CurrentThread.CurrentUICulture.LCID in string format.

List

The ID property of the list.

ListRight_AddListItems

Boolean flag that specifies whether the current user has the AddListItems permission.

ListTitle

Title of the current list in script-encoded format.

ListUrlDir

URL of the folder that contains the list in server-relative format.

LobSystemInstanceName

External data source line-of-business (LOB) system instance name.

ManualRefresh

Boolean flag that indicates whether the hosting XsltListViewWebPart has the ManualRefresh property set to true.

MasterVersion

User experience version of the current website (SPWeb). Defines which UI elements and master pages are used on the website, and is used to determine compatibility with other SharePoint components.

Modified

Localized string value of Modified in wss.resx.

Modified_By

Localized string value of Modified_By in wss.resx.

MoreAnnouncements

Localized string value of moreItemsParen in wss.resx.

NavigateForFormsPages

Boolean value that determines whether to navigate form pages or use a modal dialog box. true specifies to navigate the full page (as was done in SharePoint Foundation), and false opens the list form page in a modal dialog box.

NewGifAltString

Localized string value of new_gif_alttext in wss.resx.

NoAJAX

Boolean flag that specifies whether the view generates SharePoint Foundation 2010 or SharePoint Foundation UI markup.

NoAnnouncements

Localized string value of noXinviewofY_LIST in wss.resx.

NoAnnouncementsHowTo

Localized string value of noXinviewofY_DEFAULT in wss.resx.

NoCTX

Boolean flag that specifies whether SharePoint Foundation generates ctx (ContextInfo) ECMAScript (JavaScript, JScript) for the view.

open_menu

Localized string value of open_menu in wss.resx.

OpenMenuKeyAccessible

Localized string value of OpenMenuKeyAccessible in wss.resx.

OverrideFilterQstring

String that represents the filter operation, including additional query string-based filtering operation.

OverrideScope

View scope (SPViewScope) string value from the data source that the current view is based on.

OverrideSelectCommand

The selectcommand string from the data source on which the current view is based. The value is empty unless the HasOverrideSelectCommand property of the XsltListViewWebPart class is set to true.

PagePath

HttpRequest page path.

PagePathFinal

concat($PagePath,'?')

PresenceEnabled

If the EffectivePresenceEnabled property of the website is true, this value equals 1; otherwise, it equals 0.

Project

URL of the folder that contains the list, in website-relative format.

RecursiveView

Empty string in SharePoint Foundation 2010. Reserved for future use.

RenderCTXOnly

Specifies to render only the ctx (ContextInfo) script code, and no HTML.

RootFolderParam

String that contains the view and the RootFolder query string on which the current view is based.

RootSiteUrl

URL of the site collection root website.

RowLimit

View paging limit.

RowTotalCount

Total row count of the list item collection that is retrieved.

select_deselect_all

Localized string value of select_deselect_all in wss.resx.

SelectedID

ID of the item that is selected in the view for Web Part selection. An empty string if no item is selected.

ServerRelativeUrl

Server-relative URL of the website.

ShowAlways

Reserved for future use.

ShowWebPart

String that contains the ShowWebPart and PageView query string.

SortQueryString

String that contains SortField and SortDir query string.

SpecificFinderName

External data source–specific finder name.

TabularView

Gets or sets whether the view includes bulk operation check boxes when it is possible. At render time, SharePoint Foundation performs additional checks of the UIVersion and ViewStyle values when it determines whether to actually render individual item check boxes.

Userid

ID of the current user (ID).

View

ID of the view (ID).

ViewCounter

Integer value that identifies the Web Part. The values are unique only within a given request and may change on subsequent requests.

WebEditorPreview

Empty string in SharePoint Foundation 2010. Reserved for future use.

WebPartClientID

String value of the UniqueID property of the Web Part.

WebTitle

Title of the website (SPWeb) in script-encoded format.

WorkspaceAltString

Empty string in SharePoint Foundation 2010. Reserved for future use.

WPQ

A string value that specifies the unique identifier for the Web Part. The value can be useful when you generate script that runs on the client computer, for example, to ensure that each Web Part has a different function name. The values are unique only within a given request, and qualifiers may change on subsequent requests.

XmlDefinition

XML document object (XmlDOM) that is passed in the XsltListViewWebPart to represent the view XML (ListViewXml).

See Also

Concepts

XsltListViewWebPart and Custom List Views

Overview of XSLT List View Rendering System

XMLDefinition and CAML View Schema

XSLT Parameter Bindings

How to: Implement Resources in Custom List Views