Add a hook to add module generated output to the error page.

In our case we have to add a search box to the page after the content. Usually this could be done by adding a page--customerror.tpl.php, but in our case this did not work - possibly as we are using layouts.

CommentFileSizeAuthor
#2 2652938-2.patch365 bytesJohn Cook
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

john@johncook.me.uk created an issue. See original summary.

John Cook’s picture

Status: Active » Needs review
FileSize
365 bytes

I've added a single line to the customerror_page() function to call the hook: drupal_alter('customerror_post_render', $output);

Then in a custom module I can do:

function hook_customerror_post_render_alter(&$output) {
  $block = get_search_block();
  $output .= render($block);
}
gisle’s picture

Status: Needs review » Closed (outdated)

No review for nearly eight years. Closing as outdated.