다음을 통해 공유


NewWebPage Method

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.

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 Windows SharePoint Services, 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
1Full Page, Vertical
2Header, Footer, 3 Columns
3Header, Left Column, Body
4Header, Right Column, Body
5Header, Footer, 2 Columns, 4 Rows
6Header, Footer, 4 Columns, Top Row
7Left Column, Header, Footer, Top Row, 3 Columns
8Right 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>