I want to have one template handle all of my error pages (instead of creating 404.html, 500.html, &c.).
Asked
Active
Viewed 638 times
1 Answers
4
A big thanks to Michael Rog (@rog) for the answer on Slack. You can create a catch-all error template with the name error (using whatever file ext works for you). That template also has access to a variable called code that tells you what kind of error it is. In my case, I'm using it to display HTTP Cats.
Bryan Redeagle
- 4,065
- 13
- 27
errorTemplatePrefixsetting in the Craft General Config.) – Michael Rog Mar 27 '16 at 21:04