The Drupal 7 Template (Theme Hook) Suggestions page does not state how to name page or node templates which are intended to override 404, 403, 500, or other error pages.

I've seen posts on other sites suggesting things like page--error.tpl.php but (1) this information belongs here, (2) I haven't been able to get it to work, so I can't just go ahead and add this information myself, and (3) it needs to be rigorous, that is, it needs to distinguish between a generic error page and one specifically designed for a particular status code.

That is, for point 3, would all of the following be valid?

page--error.tpl.php
page--error-404.tpl.php
node--error.tpl.php
node--error-404.tpl.php

Please add this (and other special use cases) to this page.

Comments

lizzjoy’s picture

Project: Drupal.org content » Documentation
Component: Other » Correction/Clarification
jhodgdon’s picture

Component: Correction/Clarification » Missing documentation
Issue tags: +docsprint

This seems like a good issue for an upcoming sprint.

krina.addweb’s picture

Issue summary: View changes
hansfn’s picture

Status: Active » Closed (works as designed)

There are no theme hook suggestion for error pages. You have to use the preprocess_page hook to add template suggestions for error pages. Read for example this blog post on redcrackle.com or the documentation Specify 403 and 404 error pages (and the comments).