CustomError is an appealing module which allows customising error pages from a Drupal site with no need to create specific nodes, which could affect visiting statistics. Both 403 and 404 HTTP status codes can be handled. One hidden feature I did not find explained in the actual module documentation is that error pages can be more powerfully customised by using templates in your preferred theme folder. If you wanted to change the whole look of the page, but keeping the defined text (or code) you may have entered for each kind of error, you must create a page named
page-customerror.tpl.php. As expected,
$content variable will be replaced by the defined customised error content. In case we still desired further customisation, we could create a
customerror.tpl.php file and write specific content regardless of the entered text. However, this way, as far as I have been able to find out, sorting out 403 from 404 error pages would not be an easy task. As a last comment, this has been tested in Drupal 6.x, and according to current CustomError issues, some of present lacking features could be added in future versions of the module.
Commenting on this Blog entry is closed.