Enables scripted content fragments to get page information and set the page title.
- Properties
- AbsoluteUrl
- AddAtomLink
- AddLink
- AddMetaDescription
- AddMetaKeywords
- AddMetaTag
- AddOpenGraphMetaTag
- AddOpenGraphNamespace
- AddRssLink
- AdjustQueryString
- AdjustTarget
- ApplicationEscapeUrl
- ApplicationUnescapeUrl
- EnsureSecureConnection
- GetCookieValue
- GetFormValue
- GetFormValues
- GetQueryStringValue
- GetQueryStringValues
- MakeQueryString
- ParseQueryString
- Redirect
- RedirectToError
- RedirectToHashedQuery
- RegisterCanonicalQueryStringKey
- RegisterClientTemplate
- RegisterEndOfPageHtml
- RenderPlatformHeaders
- RenderThemeHeaders
- SendJsonError
- SendJsonWarning
- SetCanonicalLink
- SetContentType
- SetCookieValue
- SetStatusCode
- SetTitle
- SetXFrameOptions
- UrlsAreEqual
Properties
Name | Access | Type | Description |
---|---|---|---|
IpAddress | Read | String | IP address of current request |
IsAuthorization | Read | Boolean | Returns true if the current URL is rendering authorization content. |
IsInDeveloperMode | Read | Boolean | Returns true if developer mode is enabled |
IsInThemePreviewMode | Read | Boolean | Returns true if the theme is being previewed |
IsModal | Read | Boolean | Returns true if the current URL is rendering a modal. |
IsPost | Read | Boolean | Returns true if the current request was made via POST |
Layout | Read | String | Current Layout |
ReturnUrl | Read | String | URL specified by the 'returnUrl' query string parameter |
SupportsJavaScript | Read | Boolean | Whether or not JavaScript is known to be supported by the requesting browser |
ThemeName | Read | String | Current Theme Name |
ThemeTypeId | Read | Guid | Current Theme Type |
Url | Read | String | Current URL |
Methods
AbsoluteUrl
Current Absolute URL
Velocity
#set($stringResponse = $core_v2_page.AbsoluteUrl($url))
JavaScript
var stringResponse = core_v2_page.AbsoluteUrl(url);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
url | String | Url | Required |
Returns
String
AddAtomLink
Adds an Atom 1.0 autodiscoverale link to the header
Velocity
$core_v2_page.AddAtomLink($title, $href)
JavaScript
core_v2_page.AddAtomLink(title, href);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
title | String | Title | Required | ||
href | String | Href | Required |
Returns
NothingAddLink
AddLink Overload 1
Adds a new link tag to the header. Options will be added as HTML attributes
Velocity
$core_v2_page.AddLink($rel, $href, "%{ Position = $positionArg }")
JavaScript
core_v2_page.AddLink(rel, href, { Position: positionArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
rel | String | Rel | Required | ||
href | String | Href | Required | ||
attributes | Options | Set of optional parameters including: | Required | ||
Position |
| Position at which the link will be rendered within the heading | Optional | BeforeTheme | AfterTheme, BeforeAll, BeforeTheme |
AddLink Overload 2
Adds a new link tag to the header.
Velocity
$core_v2_page.AddLink($rel, $href)
JavaScript
core_v2_page.AddLink(rel, href);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
rel | String | Rel | Required | ||
href | String | Href | Required |
Returns
NothingAddMetaDescription
Adds a description meta tag to the header
Velocity
$core_v2_page.AddMetaDescription($value)
JavaScript
core_v2_page.AddMetaDescription(value);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
value | String | Value | Required |
Returns
NothingAddMetaKeywords
Adds a keyword meta tag to the header
Velocity
$core_v2_page.AddMetaKeywords($value)
JavaScript
core_v2_page.AddMetaKeywords(value);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
value | String | Value | Required |
Returns
NothingAddMetaTag
Adds a meta tag to the header
Velocity
$core_v2_page.AddMetaTag($key, $value)
JavaScript
core_v2_page.AddMetaTag(key, value);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
key | String | Key | Required | ||
value | String | Value | Required |
Returns
NothingAddOpenGraphMetaTag
Adds an Open Graph meta tag to the header
Velocity
$core_v2_page.AddOpenGraphMetaTag($property, $content)
JavaScript
core_v2_page.AddOpenGraphMetaTag(property, content);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
property | String | Property | Required | ||
content | String | Content | Required |
Returns
NothingAddOpenGraphNamespace
Adds an Open Graph namespace to the header
Velocity
$core_v2_page.AddOpenGraphNamespace($prefix, $uri)
JavaScript
core_v2_page.AddOpenGraphNamespace(prefix, uri);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
prefix | String | Prefix | Required | ||
uri | String | Uri | Required |
Returns
NothingAddRssLink
Adds a RSS 2.0 autodiscoverable link to the header
Velocity
$core_v2_page.AddRssLink($title, $href)
JavaScript
core_v2_page.AddRssLink(title, href);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
title | String | Title | Required | ||
href | String | Href | Required |
Returns
NothingAdjustQueryString
Merges and appends a new querystring with an existing URL
Velocity
#set($stringResponse = $core_v2_page.AdjustQueryString($url, $queryString))
JavaScript
var stringResponse = core_v2_page.AdjustQueryString(url, queryString);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
url | String | Url | Required | ||
queryString | String | Query String | Required |
Returns
String
AdjustTarget
Adjusts the hash target of a URL
Velocity
#set($stringResponse = $core_v2_page.AdjustTarget($url, $target))
JavaScript
var stringResponse = core_v2_page.AdjustTarget(url, target);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
url | String | Url | Required | ||
target | String | Target | Required |
Returns
String
ApplicationEscapeUrl
Escapes a URL to be relative to the application.
Velocity
#set($stringResponse = $core_v2_page.ApplicationEscapeUrl($url))
JavaScript
var stringResponse = core_v2_page.ApplicationEscapeUrl(url);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
url | String | Url | Required |
Returns
String
ApplicationUnescapeUrl
Unescapes a URL from being relative to the application.
Velocity
#set($stringResponse = $core_v2_page.ApplicationUnescapeUrl($url))
JavaScript
var stringResponse = core_v2_page.ApplicationUnescapeUrl(url);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
url | String | Url | Required |
Returns
String
EnsureSecureConnection
EnsureSecureConnection Overload 1
If not already on HTTPS, redirects to the HTTPS version of the current URL
Velocity
$core_v2_page.EnsureSecureConnection()
JavaScript
core_v2_page.EnsureSecureConnection();
EnsureSecureConnection Overload 2
If not already on HTTPS, redirects to the HTTPS version of the current URL
Velocity
$core_v2_page.EnsureSecureConnection("%{ IsAuthenticatingUser = $isAuthenticatingUserArg }")
JavaScript
core_v2_page.EnsureSecureConnection({ IsAuthenticatingUser: isAuthenticatingUserArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
options | Options | Set of optional parameters including: | Required | ||
IsAuthenticatingUser | Boolean | Is Authenticating User | Optional | False |
Returns
NothingGetCookieValue
GetCookieValue Overload 1
Gets a cookie value
Velocity
#set($stringResponse = $core_v2_page.GetCookieValue($cookieKey, "%{ cookieName = $cookieNameArg }"))
JavaScript
var stringResponse = core_v2_page.GetCookieValue(cookieKey, { cookieName: cookieNameArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
cookieKey | String | Cookie Key | Required | ||
options | Options | Set of optional parameters including: | Required | ||
cookieName | String | Cookie Name | Optional |
GetCookieValue Overload 2
Gets a cookie value
Velocity
#set($stringResponse = $core_v2_page.GetCookieValue($cookieKey))
JavaScript
var stringResponse = core_v2_page.GetCookieValue(cookieKey);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
cookieKey | String | Cookie Key | Required |
Returns
String
GetFormValue
Gets a post value
Velocity
#set($stringResponse = $core_v2_page.GetFormValue($name))
JavaScript
var stringResponse = core_v2_page.GetFormValue(name);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
name | String | Posted value key | Required |
Returns
String
GetFormValues
Gets all post values matching a key
Velocity
#set($stringResponse = $core_v2_page.GetFormValues($name))
JavaScript
var stringResponse = core_v2_page.GetFormValues(name);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
name | String | Posted value key | Required |
Returns
Array of String
GetQueryStringValue
Gets a query string value
Velocity
#set($stringResponse = $core_v2_page.GetQueryStringValue($name))
JavaScript
var stringResponse = core_v2_page.GetQueryStringValue(name);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
name | String | Query string key | Required |
Returns
String
GetQueryStringValues
Gets all query string values matching a key
Velocity
#set($stringResponse = $core_v2_page.GetQueryStringValues($name))
JavaScript
var stringResponse = core_v2_page.GetQueryStringValues(name);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
name | String | Query string key | Required |
Returns
Array of String
MakeQueryString
Converts a basic set of keys and values into a specialized query string set of keys and values
Velocity
#set($queryStringResponse = $core_v2_page.MakeQueryString())
JavaScript
var queryStringResponse = core_v2_page.MakeQueryString();
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
keysAndValues | Options | Set of optional parameters including: | Required |
Returns
ParseQueryString
Parses a query string into a specialized set of keys and values
Velocity
#set($queryStringResponse = $core_v2_page.ParseQueryString($queryString))
JavaScript
var queryStringResponse = core_v2_page.ParseQueryString(queryString);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
queryString | String | Query String | Required |
Returns
Redirect
Redirects the current request via an HTTP 302 response
Velocity
$core_v2_page.Redirect($url)
JavaScript
core_v2_page.Redirect(url);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
url | String | Url | Required |
Returns
NothingRedirectToError
Redirects the current request using the method defined for custom errors
Velocity
$core_v2_page.RedirectToError($url)
JavaScript
core_v2_page.RedirectToError(url);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
url | String | Url | Required |
Returns
NothingRedirectToHashedQuery
RedirectToHashedQuery Overload 1
Redirects from the current URL to a modified URL with the query string embedded as a hash target
Velocity
$core_v2_page.RedirectToHashedQuery()
JavaScript
core_v2_page.RedirectToHashedQuery();
RedirectToHashedQuery Overload 2
Redirects to a modified URL with the query string embedded as a hash target
Velocity
$core_v2_page.RedirectToHashedQuery($url)
JavaScript
core_v2_page.RedirectToHashedQuery(url);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
url | String | Url | Required |
Returns
NothingRegisterCanonicalQueryStringKey
Registers a query string key to be included in the canonical URL for the current page. The value(s) represented in the final canonical URL for this key will be retrieved from the current URL being rendered.
Velocity
$core_v2_page.RegisterCanonicalQueryStringKey($key)
JavaScript
core_v2_page.RegisterCanonicalQueryStringKey(key);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
key | String | The key to register to be included in the canonical URL's query string. | Required |
Returns
NothingRegisterClientTemplate
Compiles a client-side template against the provided name.
Velocity
$core_v2_page.RegisterClientTemplate($name, $templateBody)
JavaScript
core_v2_page.RegisterClientTemplate(name, templateBody);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
name | String | Name | Required | ||
templateBody | String | Template Body | Required |
Returns
NothingRegisterEndOfPageHtml
RegisterEndOfPageHtml Overload 1
Registers end-of-page HTML to be rendered if the current widget is rendered.
Velocity
$core_v2_page.RegisterEndOfPageHtml($html)
JavaScript
core_v2_page.RegisterEndOfPageHtml(html);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
html | String | Html | Required |
RegisterEndOfPageHtml Overload 2
Registers end-of-page HTML against the provided key if the current widget is rendered.
Velocity
$core_v2_page.RegisterEndOfPageHtml($key, $html)
JavaScript
core_v2_page.RegisterEndOfPageHtml(key, html);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
key | String | Key | Required | ||
html | String | Html | Required |
Returns
NothingRenderPlatformHeaders
RenderPlatformHeaders Overload 1
Renders HTML headers, including platform-defined CSS and JavaScript
Velocity
#set($stringResponse = $core_v2_page.RenderPlatformHeaders())
JavaScript
var stringResponse = core_v2_page.RenderPlatformHeaders();
RenderPlatformHeaders Overload 2
Renders HTML headers, including platform-defined CSS and JavaScript
Velocity
#set($stringResponse = $core_v2_page.RenderPlatformHeaders("%{ IsModal = $isModalArg }"))
JavaScript
var stringResponse = core_v2_page.RenderPlatformHeaders({ IsModal: isModalArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
options | Options | Set of optional parameters including: | Required | ||
IsModal | Boolean | When true, renders the configured headers for modals | Optional | False |
Returns
String
RenderThemeHeaders
RenderThemeHeaders Overload 1
Renders configured theme HTML headers, including platform-defined and theme-defined CSS and JavaScript
Velocity
#set($stringResponse = $core_v2_page.RenderThemeHeaders())
JavaScript
var stringResponse = core_v2_page.RenderThemeHeaders();
RenderThemeHeaders Overload 2
Renders configured theme HTML headers, including platform-defined and theme-defined CSS and JavaScript
Velocity
#set($stringResponse = $core_v2_page.RenderThemeHeaders("%{ ApplicationId = $applicationIdArg, ApplicationTypeId = $applicationTypeIdArg, IsModal = $isModalArg }"))
JavaScript
var stringResponse = core_v2_page.RenderThemeHeaders({ ApplicationId: applicationIdArg, ApplicationTypeId: applicationTypeIdArg, IsModal: isModalArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
options | Options | Set of optional parameters including: | Required | ||
ApplicationId | Nullable of Guid | The identifier of the application for which to render theme headers. When specified, ApplicationTypeId is also required. If not specified, the contextual application/theme will be rendered. | Optional | ||
ApplicationTypeId | Nullable of Guid | The identifier of the application type for which to render theme headers. When specified, ApplicationId is also required. If not specified, the contextual application/theme will be rendered. | Optional | ||
IsModal | Boolean | When true, renders the configured headers for modals | Optional | False |
Returns
String
SendJsonError
SendJsonError Overload 1
Formats an error message as JSON and responds with a JSON content type
Velocity
$core_v2_page.SendJsonError($errorMessage)
JavaScript
core_v2_page.SendJsonError(errorMessage);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
errorMessage | String | Error Message | Required |
SendJsonError Overload 2
Formats error messages as JSON and responds with a JSON content type
Velocity
$core_v2_page.SendJsonError($errorMessages)
JavaScript
core_v2_page.SendJsonError(errorMessages);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
errorMessages | IList of String | Error Messages | Required |
SendJsonError Overload 3
Formats an error message as JSON and responds with a JSON content type
Velocity
$core_v2_page.SendJsonError($error)
JavaScript
core_v2_page.SendJsonError(error);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
error | Error | Error | Required |
SendJsonError Overload 4
Formats error messages as JSON and responds with a JSON content type
Velocity
$core_v2_page.SendJsonError($errors)
JavaScript
core_v2_page.SendJsonError(errors);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
errors | IList of Error | Errors | Required |
Returns
NothingSendJsonWarning
SendJsonWarning Overload 1
Formats a warning message as JSON and responds with a JSON content type
Velocity
$core_v2_page.SendJsonWarning($warningMessage)
JavaScript
core_v2_page.SendJsonWarning(warningMessage);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
warningMessage | String | Warning Message | Required |
SendJsonWarning Overload 2
Formats warning messages as JSON and responds with a JSON content type
Velocity
$core_v2_page.SendJsonWarning($warningMessages)
JavaScript
core_v2_page.SendJsonWarning(warningMessages);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
warningMessages | IList of String | Warning Messages | Required |
SendJsonWarning Overload 3
Formats a warning message as JSON and responds with a JSON content type
Velocity
$core_v2_page.SendJsonWarning($warning)
JavaScript
core_v2_page.SendJsonWarning(warning);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
warning | Warning | Warning | Required |
SendJsonWarning Overload 4
Formats warning messages as JSON and responds with a JSON content type
Velocity
$core_v2_page.SendJsonWarning($warnings)
JavaScript
core_v2_page.SendJsonWarning(warnings);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
warnings | IList of Warning | Warnings | Required |
Returns
NothingSetCanonicalLink
Overrides the default canonical Url defined for the page.
Velocity
$core_v2_page.SetCanonicalLink($uri)
JavaScript
core_v2_page.SetCanonicalLink(uri);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
uri | String | Uri | Required |
Returns
NothingSetContentType
Sets the content type on the current HTTP response
Velocity
$core_v2_page.SetContentType($contentType)
JavaScript
core_v2_page.SetContentType(contentType);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentType | String | Content Type | Required |
Returns
NothingSetCookieValue
SetCookieValue Overload 1
Sets a cookie value
Velocity
$core_v2_page.SetCookieValue($cookieKey, $cookieValue, "%{ CookieName = $cookieNameArg, HttpOnly = $httpOnlyArg, SameSiteMode = $sameSiteModeArg }")
JavaScript
core_v2_page.SetCookieValue(cookieKey, cookieValue, { CookieName: cookieNameArg, HttpOnly: httpOnlyArg, SameSiteMode: sameSiteModeArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
cookieKey | String | Cookie Key | Required | ||
cookieValue | String | Cookie Value | Required | ||
options | Options | Set of optional parameters including: | Required | ||
CookieName | String | Cookie Name | Optional | ||
HttpOnly | Boolean | Http Only | Optional | ||
SameSiteMode | String | Same Site Mode | Optional | Lax |
SetCookieValue Overload 2
Sets a cookie value
Velocity
$core_v2_page.SetCookieValue($cookieKey, $cookieValue)
JavaScript
core_v2_page.SetCookieValue(cookieKey, cookieValue);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
cookieKey | String | Cookie Key | Required | ||
cookieValue | String | Cookie Value | Required |
Returns
NothingSetStatusCode
Sets an explicit status code on the current HTTP response
Velocity
$core_v2_page.SetStatusCode($code)
JavaScript
core_v2_page.SetStatusCode(code);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
code | Int32 | Code | Required |
Returns
NothingSetTitle
Sets the page title
Velocity
$core_v2_page.SetTitle($title, $includeContext, $includeSiteName)
JavaScript
core_v2_page.SetTitle(title, includeContext, includeSiteName);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
title | String | Title | Required | ||
includeContext | Boolean | Whether to include the current container name | Required | ||
includeSiteName | Boolean | Whether to include the site name | Required |
Returns
NothingSetXFrameOptions
SetXFrameOptions Overload 1
Overrides the site-wide X-FRAME-OPTIONS HTTP header to remove the header
Velocity
$core_v2_page.SetXFrameOptions()
JavaScript
core_v2_page.SetXFrameOptions();
SetXFrameOptions Overload 2
Overrides the site-wide X-FRAME-OPTIONS HTTP header. Unsets the header when passed an empty string.
Velocity
$core_v2_page.SetXFrameOptions($options)
JavaScript
core_v2_page.SetXFrameOptions(options);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
options | String | Options | Required |
Returns
NothingUrlsAreEqual
UrlsAreEqual Overload 1
Compare two URLs for equality.
Velocity
#set($booleanResponse = $core_v2_page.UrlsAreEqual($url1, $url2))
JavaScript
var booleanResponse = core_v2_page.UrlsAreEqual(url1, url2);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
url1 | String | Url 1 | Required | ||
url2 | String | Url 2 | Required |
UrlsAreEqual Overload 2
Compare two URLs for equality.
Velocity
#set($booleanResponse = $core_v2_page.UrlsAreEqual($url1, $url2, "%{ IgnoreQueryString = $ignoreQueryStringArg, IgnoreTarget = $ignoreTargetArg }"))
JavaScript
var booleanResponse = core_v2_page.UrlsAreEqual(url1, url2, { IgnoreQueryString: ignoreQueryStringArg, IgnoreTarget: ignoreTargetArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
url1 | String | Url 1 | Required | ||
url2 | String | Url 2 | Required | ||
options | Options | Set of optional parameters including: | Required | ||
IgnoreQueryString | Boolean | When true, the querystring will not be included in the comparison for equality. | Optional | False | |
IgnoreTarget | Boolean | When true, the target will not be included in the comparison for equality. | Optional | False |
Returns
Boolean