Add error templates

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"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>$statusCode - $statusText</title>
	</head>
	<body>
		<h1>$statusCode - $statusText</h1>
		<p>An error occurred</p>
	</body>
</html>
HTML/XML

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>
#end
XML

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

Cookie Notice

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

OK Don't track me.