Errors is a simple module that allows you to theme the 403 and 404 pages. Although this is a simple module, you'll require some basic understanding of HTML/PHP and how to override some theme files.

There is no UI with this module, just use your Theme to theme your templates the way you like it, this provides maximum flexibility.

Installation and configuration
Once you install this module, go to admin/settings/error-reporting and set the following paths:

- 403 : "error/403"
- 404 : "error/404"

To theme both pages you can create the following files in your theme:

- error-403.tpl.php
- error-404.tpl.php

You can also use preprocess to create your own variables:

<?php
function mytheme_preprocess_error_403(&$variables) {
 
$variables['some_text'] = "Sorry, you don't have access to this page";
 
$path = drupal_get_path("theme", "mytheme");
 
$variables['image'] = theme("image", $path . "/images/someimage.png");
}

function
mytheme_preprocess_error_404(&$variables) {
 
$variables['some_text'] = "Sorry, the page you're requesting does not exist.";
}
?>

Downloads

Version Downloads Date Links
6.x-1.x-dev tar.gz (6.42 KB) | zip (7.06 KB) 2011-Sep-16 Notes

Project Information


Maintainers for Errors

  • lelizondo - 1 commit
    last: 36 weeks ago, first: 36 weeks ago

Issues for Errors

To avoid duplicates, please search before submitting a new issue.
All issues
Bug reports