NewWebPage Method

Applies to: SharePoint Foundation 2010

Creates a new Web Part Page or a new basic page in the specified document library.

<Method ID="Text">
  <SetList Scope="Request">GUID</SetList>
  <SetVar Name="Cmd">NewWebPage</SetVar>
  <SetVar Name="ID">New</SetVar>
  <SetVar Name="Type">[WebPartPage|BasicPage]</SetVar>
  <SetVar Name="WebPartPageTemplate">[1-8]</SetVar>
  <SetVar Name="Overwrite">[true|false]</SetVar>
  <SetVar Name="Title">Text</SetVar>
</Method>

Parameters

Parameter

Description

ID = "Text"

Application-specific string. In an HTML editor compatible with Microsoft SharePoint Foundation, such as Microsoft Office SharePoint Designer 2007, the string provides the sequence number and name of the method.

Scope = "Request"

When set to Request, the Scope attribute sets the variable for the scope of the enclosing Method element, unless the variable is changed by another tag.

Name = "Cmd"

Must be set to NewWebPage.

Name = "ID"

Must be set to New.

Name = "Type"

Specifies the type of Web page to create. Possible values include WebPartPage and BasicPage. A Web Part Page contains multiple Web Part zones and allows different Web Parts to be added to each zone on the page, while a basic page has only one zone and by default contains a Content Editor Web Part.

Name = "WebPartPageTemplate"

Specifies the template to use for the Web Part Page. Possible values, listed in the following table, correspond to layout templates shown on the New Web Part Page.

This parameter is ignored for basic pages.

ValueDescription
1 Full Page, Vertical
2 Header, Footer, 3 Columns
3 Header, Left Column, Body
4 Header, Right Column, Body
5 Header, Footer, 2 Columns, 4 Rows
6 Header, Footer, 4 Columns, Top Row
7 Left Column, Header, Footer, Top Row, 3 Columns
8 Right Column, Header, Footer, Top Row, 3 Columns

Name = "Overwrite"

Specifies true to overwrite any file of the same name that exists; otherwise, false.

Name = "Title"

Specifies the file name of the new Web page. For a Web Part Page, also specifies the title that is displayed on the page.

Decoded

<Method ID="0,NewWebPage">
  <SetList Scope="Request">6beeefcd-866d-4fc7-94b9-
    94e6297386bc</SetList>
  <SetVar Name="Cmd">NewWebPage</SetVar>
  <SetVar Name="ID">New</SetVar>
  <SetVar Name="Type">WebPartPage</SetVar>
  <SetVar Name="WebPartPageTemplate">3</SetVar>
  <SetVar Name="Overwrite">true</SetVar>
  <SetVar Name="Title">Text</SetVar>
</Method>