ApplicationRoot

The ApplicationRoot keyword is used to retrieve a text value that contains the URL root-path of the portal.

Mainly useful for the preview as that includes the portal-id in the url.

This function is SQL compatible. For more information about SQL compatibility, see our documentation.

Returns a text value containing the root-path of the application (excludes the hostname).

In Preview, it will yield the portal-id like "/{portal-id}" In Staging/Live runtimes, it will yield an empty string.

Combined with the function HostName() you can create a deeplink to a certain navigation item by its Path Name that will work in Preview (having the portal-id) as well as in Staging and Live

Syntax

ApplicationRoot

In Preview, your application will show https://preview.wem.io/{portal-id}?sv={session} ApplicationRoot => "/123456" where 123456 is your portal id.

hostname() + applicationroot + "/path-to-navigationitem" => "preview.wem.io/123456/path-to-navigationitem" on Preview => "portalname.staging.wem.io/path-to-navigationitem" on Staging => "portalname.live.wem.io/path-to-navigationitem" on Live

Last updated