Subsite.getContext (Method)
Returns a structure containing information about the current user's context; for example, the current site and subsite, their names and relative URLs, and so on.
Returns:
Subsite_GetContext_Result (struct)
Each row of the returned query results has the following fields:
Field Name | Type | Description |
---|---|---|
MenuContextTimestamp | PlainText_NonNull | The date and time of when the last change to the MenuContext object occurred. See SiteMenuContext for additional information. |
ServerAdminURL | ServerRelativeURL | The server-relative URL to the server administrator. |
SiteID | AnySiteID | The site's ID. |
SiteName | PlainText_NonNull_50 | The site's name. |
SiteState | SiteState | An integer representing the state of the site as follows: 0 (Inactive) or 1 (Active). |
SiteType | SiteType | An integer representing the type of site: 0 (non root-level site) 1 (root-level site), or 2 (Site 0). |
SiteURL | ServerRelativeURL | The site's URL. |
SubsiteID | SubsiteID | The current subsite's ID. |
SubsiteName | PlainText_NonNull_255 | The current subsite's name. |
SubsiteURL | SubsiteURL | The current subsite's server-relative URL. |
Arguments:
Name | Type | Required | Description |
---|---|---|---|
subsiteIDOrURL | SubsiteIDorURL_EmptyString | Required | The ID of the target subsite, or the server relative path to the target subsite, or an empty string for the current subsite. |
Context:
License Requirements | None |
Permission Requirements | ContributorOrServerCode |
Deny Context | None |
Require Context | None |
Author Lock | (not required) |
Transaction Logging | Transaction logging is disabled for this method |
Customization | This method may be customized at the site level |
Error Codes:
None
Notes:
None