SPWeb class
This class is primarily used with the PageContext
class. It provides contextual information for the SharePoint site ("SPWeb") that hosts the page.
Remarks
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the SPWeb
class.
Properties
absolute |
Returns the absolute URL for this SPWeb. Example: |
description | Returns the description of the current SPWeb. |
first |
Returns the web's regional first day of week setting or undefined if it hasn't been set. |
id | The GUID that identifies the SPWeb on the server. |
is |
Returns true if this |
language | Returns the locale identifier (LCID) for the default language of the website. |
language |
Returns the language name for the default language of the website. |
logo |
Returns the absolute URL of the website logo. |
permissions | Return the SPPermission object that represents the set of permissions that the current user has for interacting with the web. |
server |
Returns the server-relative URL for this SPWeb. |
template |
Returns the string representing the numeric identifier for the site definition or site template that was used to create the site. |
time |
Returns the web's regional timezone settings or undefined if they haven't been set. |
title | Returns the title of the current SPWeb. |
Property Details
absoluteUrl
Returns the absolute URL for this SPWeb. Example: "https://example.com/sites/PubSite/SubWeb"
readonly absoluteUrl: string;
Property Value
string
description
Returns the description of the current SPWeb.
readonly description: string;
Property Value
string
firstDayOfWeek
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Returns the web's regional first day of week setting or undefined if it hasn't been set.
readonly firstDayOfWeek: SPDayOfWeek | undefined;
Property Value
SPDayOfWeek | undefined
id
isAppWeb
Returns true if this SPWeb
the container web for an SPApp
.
readonly isAppWeb: boolean;
Property Value
boolean
language
Returns the locale identifier (LCID) for the default language of the website.
readonly language: number;
Property Value
number
Remarks
Example: 1033 represents the locale identifier for en-US.
languageName
Returns the language name for the default language of the website.
readonly languageName: string;
Property Value
string
Remarks
Example: en-US represents the English language in the US locale.
logoUrl
Returns the absolute URL of the website logo.
readonly logoUrl: string;
Property Value
string
Remarks
Example: https://example.com/sites/PubSite/SubWeb/logo.jpg
permissions
Return the SPPermission object that represents the set of permissions that the current user has for interacting with the web.
readonly permissions: SPPermission;
Property Value
serverRelativeUrl
Returns the server-relative URL for this SPWeb.
readonly serverRelativeUrl: string;
Property Value
string
Remarks
Example: "/sites/PubSite/SubWeb"
templateName
Returns the string representing the numeric identifier for the site definition or site template that was used to create the site.
readonly templateName: string;
Property Value
string
Remarks
Example: "1"
represents the team site template when creating a new site on SharePoint.
timeZoneInfo
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Returns the web's regional timezone settings or undefined if they haven't been set.
readonly timeZoneInfo: SPTimeZone | undefined;
Property Value
SPTimeZone | undefined
title
Returns the title of the current SPWeb.
readonly title: string;
Property Value
string