Answers.Body: <p>A big thanks to Michael Rog (@rog) for the answer on Slack. You can create a catch-all error template with the name <code>error</code> (using whatever file ext works for you). That template also has access to a variable called <code>code</code> that tells you what kind of error it is. In my case, I'm using it to display <a href="https://http.cat/">HTTP Cats</a>.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-27T21:04:58.233Z
Answers.Text: (p.s. You can customize the location for your error templates by changing the `errorTemplatePrefix` setting in the [Craft General Config](https://craftcms.com/docs/config-settings).)
Answers.UserDisplayName: Michael Rog
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-27T20:49:09.913Z
Answers.LastActivityDate: 2016-03-27T20:49:09.913Z
Answers.UserDisplayName: Bryan Redeagle
Body: <p>I want to have one template handle all of my error pages (instead of creating 404.html, 500.html, &amp;c.).</p>
  
Tags: <error-templates>
Title: How do you create dynamic error pages?
ThreadText: # How do you create dynamic error pages?
  
  (Asked by: username_0 on 2016-03-27)
  
  I want to have one template handle all of my error pages (instead of creating 404.html, 500.html, &c.).
  
  **Tags:** error-templates
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2016-03-27. Score: 4
  
  A big thanks to username_1 (@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](https://http.cat/).
  
  > **Comments:**
  > **username_1**: (p.s. You can customize the location for your error templates by changing the `errorTemplatePrefix` setting in the [Craft General Config](https://craftcms.com/docs/config-settings).)  
  
  ---
  
  