Table of contents
TOC
Collapse the table of content
Expand the table of content

WebExtensions Class

SharePoint Dev Documents|Last Updated: 9/8/2017
|
1 Contributor

Class that holds deprecated methods for site (both site collection and web site) creation, status, retrieval and settings

Class that deals with site (both site collection and web site) creation, status, retrieval and settings

Namespace:Microsoft.SharePoint.Client
Assembly: OfficeDevPnP.Core.dll

Inheritance Hierarchy

System.Object

Syntax

public static class WebExtensions

Extension Methods

NameDescription
AddIndexedPropertyBagKey(Web, String)Marks a property bag key for indexing
AddRemoteEventReceiver(Web, String, String, EventReceiverType, EventReceiverSynchronization, Boolean)Registers a remote event receiver
AddRemoteEventReceiver(Web, String, String, EventReceiverType, EventReceiverSynchronization, Int32, Boolean)Registers a remote event receiver
ApplyProvisioningTemplate(Web, ProvisioningTemplate, ProvisioningTemplateApplyingInformation)Can be used to apply custom remote provisioning template on top of existing site.
CreateWeb(Web, SiteEntity, Boolean, Boolean)Adds a new child Web (site) to a parent Web.
CreateWeb(Web, String, String, String, String, Int32, Boolean, Boolean)Adds a new child Web (site) to a parent Web.
DeleteWeb(Web, String)Deletes the child website with the specified leaf URL, from a parent Web, if it exists.
DeployApplicationPackageToAppCatalog(Web, String, String, Boolean, Boolean)Adds a package to the tenants app catalog and by default deploys it if the package is a client side package (sppkg)
DeployApplicationPackageToAppCatalog(Web, String, String, Boolean, Boolean, Boolean)Adds a package to the tenants app catalog and by default deploys it if the package is a client side package (sppkg)
DisableRequestAccess(Web)Disables the request access on the web.
EnableRequestAccess(Web, String[])Enables request access for the specified e-mail addresses.
EnableRequestAccess(Web, IEnumerable<String>)Enables request access for the specified e-mail addresses.
GetAllWebUrls(Site)Gets the collection of the URLs of all Web sites that are contained within the site collection, including the top-level site and its subsites.
GetAppCatalog(Web)Gets the Uri for the tenant's app catalog site (if that one has already been created)
GetAppInstances(Web, Expression<Func<AppInstance, Object>>[])Returns all app instances
GetBaseTemplateId(Web)Returns the Base Template ID for the current web
GetEventReceiverById(Web, Guid)Returns an event receiver definition
GetEventReceiverByName(Web, String)Returns an event receiver definition
GetIndexedPropertyBagKeys(Web)Returns all keys in the property bag that have been marked for indexing
GetPropertyBagValueDateTime(Web, String, DateTime)Get DateTime typed property bag value. If does not contain, returns default value.
GetPropertyBagValueInt(Web, String, Int32)Get int typed property bag value. If does not contain, returns default value.
GetPropertyBagValueString(Web, String, String)Get string typed property bag value. If does not contain, returns given default value.
GetProvisioningTemplate(Web)Can be used to extract custom provisioning template from existing site. The extracted template will be compared with the default base template.
GetProvisioningTemplate(Web, ProvisioningTemplateCreationInformation)Can be used to extract custom provisioning template from existing site. The extracted template will be compared with the default base template.
GetRequestAccessEmails(Web)Gets the request access e-mail addresses of the web.
GetWeb(Web, String)Returns the child Web site with the specified leaf URL.
InstallSolution(Site, Guid, String, Int32, Int32)Uploads and installs a sandbox solution package (.WSP) file, replacing existing solution if necessary.
IsNoScriptSite(Site)Detects if the site in question has no script enabled or not. Detection is done by verifying if the AddAndCustomizePages permission is missing. See https://support.office.com/en-us/article/Turn-scripting-capabilities-on-or-off-1f2c515f-5d7e-448a-9fd7-835da935584f for the effects of NoScript
IsNoScriptSite(Web)Detects if the site in question has no script enabled or not. Detection is done by verifying if the AddAndCustomizePages permission is missing. See https://support.office.com/en-us/article/Turn-scripting-capabilities-on-or-off-1f2c515f-5d7e-448a-9fd7-835da935584f for the effects of NoScript
IsPublishingWeb(Web)Checks if the current web is a publishing site or not
IsSubSite(Web)Checks if the current web is a sub site or not
MySiteSearch(Web)Returns all my site site collections
PropertyBagContainsKey(Web, String)Checks if the given property bag entry exists
ReIndexWeb(Web)Queues a web for a full crawl the next incremental/continous crawl
RemoveAppInstanceByTitle(Web, String)Removes the app instance with the specified title.
RemoveIndexedPropertyBagKey(Web, String)Unmarks a property bag key for indexing
RemovePropertyBagValue(Web, String)Removes a property bag value from the property bag
SetLocalizationLabels(Web, String, String, String)Can be used to set translations for different cultures.
SetPageOutputCache(Web, Boolean, Int32, Int32, Boolean)Sets output cache on publishing web. The settings can be maintained from UI by visiting url /_layouts/15/sitecachesettings.aspx
SetPropertyBagValue(Web, String, Int32)Sets a key/value pair in the web property bag
SetPropertyBagValue(Web, String, String)Sets a key/value pair in the web property bag
SetPropertyBagValue(Web, String, DateTime)Sets a key/value pair in the web property bag
SiteSearch(Web)Returns all site collections that are indexed. In MT the search center, mysite host and contenttype hub are defined as non indexable by default and thus are not returned
SiteSearch(Web, String, Boolean)Returns the site collections that comply with the passed keyword query
SiteSearchScopedByTitle(Web, String)Returns all site collection that match with the provided title
SiteSearchScopedByUrl(Web, String)Returns all site collection that start with the provided URL
UninstallSolution(Site, Guid, String, Int32, Int32)Uninstalls a sandbox solution package (.WSP) file
WebExists(Web, String)Determines if a child Web site with the specified leaf URL exists.
WebExistsByTitle(Web, String)Determines if a web exists by title.
WebExistsFullUrl(ClientRuntimeContext, String)Determines if a Web (site) exists at the specified full URL, either accessible or that returns an access error.

Examples

web.SetLocalizationForSiteLabels("fi-fi", "Name of the site in Finnish", "Description in Finnish");

See also

© 2018 Microsoft