Hostname

The Hostname() function returns the domain name of the active portal of your published WEM project. For more information about the domain name visit https://en.wikipedia.org/wiki/Domain_name.

This function can be used to create links to (specific pages of) your application. For example a link in a reset password or create account e-mail (see syntax for an example). By using the hostname function you ensure that the generated link always points to the right portal in the right environment.

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

Returns a text that contains the hostname of the portal in its particular runtime environment when used.

Syntax

Hostname()

Hostname() => portalname.staging.wem.io (on staging runtime) => portalname.live.wem.io (on live runtime)

"https://" + Hostname() + "/create-account" => https://portalname.staging.wem.io/create-account (on staging runtime) => https://portalname.live.wem.io/create-account (on live runtime)

Last updated