You are here

README.txt in 404 Blocks 5

ABOUT
-----

On 404 Not Found pages, Drupal will skip rendering of several pieces of your
website for performance reasons. These include:
  1. The "Left" and "Right" regions of your theme.
  2. The "Primary links" block and any other menu links block.*
  3. The Primary links and Secondary links of your theme.*

     * Unless you have configured a "Default 404 (not found) page" on
       admin/settings/error-reporting.

But many websites find those items invaluable. Especially on 404 pages, when
they want to show users how to get to real pages.

So this module simply revives those features on 404 pages.


INSTALLATION
------------

Unless you are using the Zen theme, you will need to modify your theme using the
instructions below:

To let your PHPTemplate-based theme interact with this module, you need to add
some code to the template.php file that comes with your theme. If there is no template.php file, you can simply create one. Here is the code:

function _phptemplate_variables($hook, $vars) {
  $vars = array();
  if ($hook == 'page') {

    // These are the only important lines
    if (module_exists('blocks404')) {
      blocks404_preprocess_page(&$vars, $hook);
    }

  }
  return $vars;
}

File

README.txt
View source
  1. ABOUT
  2. -----
  3. On 404 Not Found pages, Drupal will skip rendering of several pieces of your
  4. website for performance reasons. These include:
  5. 1. The "Left" and "Right" regions of your theme.
  6. 2. The "Primary links" block and any other menu links block.*
  7. 3. The Primary links and Secondary links of your theme.*
  8. * Unless you have configured a "Default 404 (not found) page" on
  9. admin/settings/error-reporting.
  10. But many websites find those items invaluable. Especially on 404 pages, when
  11. they want to show users how to get to real pages.
  12. So this module simply revives those features on 404 pages.
  13. INSTALLATION
  14. ------------
  15. Unless you are using the Zen theme, you will need to modify your theme using the
  16. instructions below:
  17. To let your PHPTemplate-based theme interact with this module, you need to add
  18. some code to the template.php file that comes with your theme. If there is no template.php file, you can simply create one. Here is the code:
  19. function _phptemplate_variables($hook, $vars) {
  20. $vars = array();
  21. if ($hook == 'page') {
  22. // These are the only important lines
  23. if (module_exists('blocks404')) {
  24. blocks404_preprocess_page(&$vars, $hook);
  25. }
  26. }
  27. return $vars;
  28. }