You're using an outdated browser

For a better experience, keep your browser up to date. Check here for the latest version.


Add error templates

Thomas Walker

Thomas Walker Last update: Oct 27, 2017

If an error occurs while rendering the page, Scroll Viewport locates the appropriate error template to render that error.

Creating Velocity templates for error pages

Create a new Velocity template called error.vm, then fill it with the following content and upload it:

Creating a default error-page

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
		<title>$statusCode - $statusText</title>
		<h1>$statusCode - $statusText</h1>
		<p>An error occurred</p>

Redirect to another page

To redirect from an error page to another page, implement the following code into your error page:

Redirecting from an error 404 page to the homepage

#if ($statusCode == 404)
    <script>window.location = "$space.link";</script>

In this example, the user would be redirected to the homepage of the space if an 404 error occurs.

We use cookies to create a secure and effective browsing experience for our website visitors and to understand how you use our site (i.e. Google Analytics). For more information: click here.