Enables scripted content fragments to get page information and set the page title.
Properties
Name | Type | Description | Default | Options |
---|---|---|---|---|
IpAddress | string | IP address of current request | ||
IsAuthorization | bool | Returns true if the current URL is rendering authorization content. | ||
IsInThemePreviewMode | bool | Returns true if the theme is being previewed | ||
IsModal | bool | Returns true if the current URL is rendering a modal. | ||
IsPost | bool | Returns true if the current request was made via POST | ||
Layout | string | Current Layout | ||
ReturnUrl | string | URL specified by the 'returnUrl' query string parameter | ||
SupportsJavaScript | bool | Whether or not JavaScript is known to be supported by the requesting browser | ||
ThemeName | string | Current Theme Name | ||
ThemeTypeId | Guid | Current Theme Type | ||
Url | string | Current URL |
Methods
AbsoluteUrl
Current Absolute URL
Usage
#set($stringResponse = $core_v2_page.AbsoluteUrl($url))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
url | string | Url | Required |
Return Type
string
AddAtomLink
Adds an Atom 1.0 autodiscoverale link to the header
Usage
$core_v2_page.AddAtomLink($title, $href)
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
title | string | Title | Required | ||
href | string | Href | Required |
AddLink
Adds a new link tag to the header.
Usage
$core_v2_page.AddLink($rel, $href)
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
rel | string | Rel | Required | ||
href | string | Href | Required |
AddLink
Adds a new link tag to the header. Options will be added as HTML attributes
Usage
$core_v2_page.AddLink($rel, $href, "%{Position = $positionArg}")
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
rel | string | Rel | Required | ||
href | string | Href | Required | ||
Position |
| Position at which the link will be rendered within the heading | Optional | BeforeTheme | AfterTheme, BeforeTheme |
AddMetaDescription
Adds a description meta tag to the header
Usage
$core_v2_page.AddMetaDescription($value)
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
value | string | Value | Required |
AddMetaKeywords
Adds a keyword meta tag to the header
Usage
$core_v2_page.AddMetaKeywords($value)
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
value | string | Value | Required |
AddMetaTag
Adds a meta tag to the header
Usage
$core_v2_page.AddMetaTag($key, $value)
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
key | string | Key | Required | ||
value | string | Value | Required |
AddOpenGraphMetaTag
Adds an Open Graph meta tag to the header
Usage
$core_v2_page.AddOpenGraphMetaTag($property, $content)
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
property | string | Property | Required | ||
content | string | Content | Required |
AddOpenGraphNamespace
Adds an Open Graph namespace to the header
Usage
$core_v2_page.AddOpenGraphNamespace($prefix, $uri)
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
prefix | string | Prefix | Required | ||
uri | string | Uri | Required |
AddRssLink
Adds a RSS 2.0 autodiscoverable link to the header
Usage
$core_v2_page.AddRssLink($title, $href)
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
title | string | Title | Required | ||
href | string | Href | Required |
AdjustQueryString
Merges and appends a new querystring with an existing URL
Usage
#set($stringResponse = $core_v2_page.AdjustQueryString($url, $queryString))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
url | string | Url | Required | ||
queryString | string | Query String | Required |
Return Type
string
AdjustTarget
Adjusts the hash target of a URL
Usage
#set($stringResponse = $core_v2_page.AdjustTarget($url, $target))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
url | string | Url | Required | ||
target | string | Target | Required |
Return Type
string
ApplicationEscapeUrl
Escapes a URL to be relative to the application.
Usage
#set($stringResponse = $core_v2_page.ApplicationEscapeUrl($url))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
url | string | Url | Required |
Return Type
string
ApplicationUnescapeUrl
Unescapes a URL from being relative to the application.
Usage
#set($stringResponse = $core_v2_page.ApplicationUnescapeUrl($url))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
url | string | Url | Required |
Return Type
string
EnsureSecureConnection
If not already on HTTPS, redirects to the HTTPS version of the current URL
Usage
$core_v2_page.EnsureSecureConnection()
EnsureSecureConnection
If not already on HTTPS, redirects to the HTTPS version of the current URL
Usage
$core_v2_page.EnsureSecureConnection("%{IsAuthenticatingUser = $isAuthenticatingUserArg}")
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
IsAuthenticatingUser | bool | Is Authenticating User | Optional | False |
GetCookieValue
Gets a cookie value
Usage
#set($stringResponse = $core_v2_page.GetCookieValue($cookieKey))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
cookieKey | string | Cookie Key | Required |
Return Type
string
GetCookieValue
Gets a cookie value
Usage
#set($stringResponse = $core_v2_page.GetCookieValue($cookieKey, "%{cookieName = $cookieNameArg}"))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
cookieKey | string | Cookie Key | Required | ||
cookieName | string | Cookie Name | Optional |
Return Type
string
GetFormValue
Gets a post value
Usage
#set($stringResponse = $core_v2_page.GetFormValue($name))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
name | string | Posted value key | Required |
Return Type
string
GetFormValues
Gets all post values matching a key
Usage
#set($string[]Response = $core_v2_page.GetFormValues($name))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
name | string | Posted value key | Required |
Return Type
string[]
GetQueryStringValue
Gets a query string value
Usage
#set($stringResponse = $core_v2_page.GetQueryStringValue($name))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
name | string | Query string key | Required |
Return Type
string
GetQueryStringValues
Gets all query string values matching a key
Usage
#set($string[]Response = $core_v2_page.GetQueryStringValues($name))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
name | string | Query string key | Required |
Return Type
string[]
MakeQueryString
Converts a basic set of keys and values into a specialized query string set of keys and values
Usage
#set($queryStringResponse = $core_v2_page.MakeQueryString())
Return Type
ParseQueryString
Parses a query string into a specialized set of keys and values
Usage
#set($queryStringResponse = $core_v2_page.ParseQueryString($queryString))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
queryString | string | Query String | Required |
Return Type
Redirect
Redirects the current request via an HTTP 302 response
Usage
$core_v2_page.Redirect($url)
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
url | string | Url | Required |
RedirectToHashedQuery
Redirects to a modified URL with the query string embedded as a hash target
Usage
$core_v2_page.RedirectToHashedQuery($url)
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
url | string | Url | Required |
RedirectToHashedQuery
Redirects from the current URL to a modified URL with the query string embedded as a hash target
Usage
$core_v2_page.RedirectToHashedQuery()
RenderPlatformHeaders
Renders HTML headers, including platform-defined CSS and JavaScript
Usage
#set($stringResponse = $core_v2_page.RenderPlatformHeaders())
Return Type
string
RenderPlatformHeaders
Renders HTML headers, including platform-defined CSS and JavaScript
Usage
#set($stringResponse = $core_v2_page.RenderPlatformHeaders("%{IsModal = $isModalArg}"))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
IsModal | bool | When true, renders the configured headers for modals | Optional | False |
Return Type
string
RenderThemeHeaders
Renders configured theme HTML headers, including platform-defined and theme-defined CSS and JavaScript
Usage
#set($stringResponse = $core_v2_page.RenderThemeHeaders("%{IsModal = $isModalArg}"))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
IsModal | bool | When true, renders the configured headers for modals | Optional | False |
Return Type
string
RenderThemeHeaders
Renders configured theme HTML headers, including platform-defined and theme-defined CSS and JavaScript
Usage
#set($stringResponse = $core_v2_page.RenderThemeHeaders())
Return Type
string
SendJsonError
Formats error messages as JSON and responds with a JSON content type
Usage
$core_v2_page.SendJsonError($errors)
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
errors | IList<Error> | Errors | Required |
SendJsonError
Formats an error message as JSON and responds with a JSON content type
Usage
$core_v2_page.SendJsonError($errorMessage)
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
errorMessage | string | Error Message | Required |
SendJsonError
Formats error messages as JSON and responds with a JSON content type
Usage
$core_v2_page.SendJsonError($errorMessages)
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
errorMessages | IList<string> | Error Messages | Required |
SetCanonicalLink
Overrides the default canonical Url defined for the page.
Usage
$core_v2_page.SetCanonicalLink($uri)
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
uri | string | Uri | Required |
SetContentType
Sets the content type on the current HTTP response
Usage
$core_v2_page.SetContentType($contentType)
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentType | string | Content Type | Required |
SetCookieValue
Sets a cookie value
Usage
$core_v2_page.SetCookieValue($cookieKey, $cookieValue, "%{CookieName = $cookieNameArg, HttpOnly = $httpOnlyArg}")
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
cookieKey | string | Cookie Key | Required | ||
cookieValue | string | Cookie Value | Required | ||
CookieName | string | Cookie Name | Optional | ||
HttpOnly | bool | Http Only | Optional |
SetCookieValue
Sets a cookie value
Usage
$core_v2_page.SetCookieValue($cookieKey, $cookieValue)
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
cookieKey | string | Cookie Key | Required | ||
cookieValue | string | Cookie Value | Required |
SetStatusCode
Sets an explicit status code on the current HTTP response
Usage
$core_v2_page.SetStatusCode($code)
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
code | int | Code | Required |
SetTitle
Sets the page title
Usage
$core_v2_page.SetTitle($title, $includeContext, $includeSiteName)
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
title | string | Title | Required | ||
includeContext | bool | Whether to include the current container name | Required | ||
includeSiteName | bool | Whether to include the site name | Required |
SetXFrameOptions
Overrides the site-wide X-FRAME-OPTIONS HTTP header to remove the header
Usage
$core_v2_page.SetXFrameOptions()
SetXFrameOptions
Overrides the site-wide X-FRAME-OPTIONS HTTP header. Unsets the header when passed an empty string.
Usage
$core_v2_page.SetXFrameOptions($options)
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
options | string | Options | Required |