Customizing error pages
Statamic will show its own error pages by default. For example, if a user were to go snooping where they shouldn’t, they may come across a
403 “Access Denied” page.
But what if you want to customize their appearance?
Statamic will look inside your theme’s
templates/errors1 folder for a template matching the response code. Page not found? That’s a 404 error, so a
404.html template will be loaded.
If you don’t want to use your default layout view (for example if you want to remove your nav, footer, etc) you can create a
Setting Page Variables
The easiest way to set page variables on error templates would be by adding a block of YAML Front Matter to the top of the template.
--- title: 404 Ruh Roh --- <h1>Page Not Found</h1> <p>How about the <a href="/">home page</a> instead?</p>
This can be adjusted by editing the
error_template_foldervariable in your
themingsettings. For example, set it to
/if you want your error templates in your root template folder. ↩︎