You are here

function theme_wikitools_page_does_not_exist in Wikitools 6

Same name and namespace in other branches
  1. 5 wikitools.module \theme_wikitools_page_does_not_exist()
  2. 7 wikitools.pages.inc \theme_wikitools_page_does_not_exist()
1 theme call to theme_wikitools_page_does_not_exist()
wikitools_handle_request in ./wikitools.pages.inc
Menu callback for wiki path. This function is called if a page without an alias is called below the wiki path.

File

./wikitools.pages.inc, line 143
Page callbacks for wikitools pages.

Code

function theme_wikitools_page_does_not_exist($page_name) {
  $output = '<p>' . t('The page %page_name does not exist.', array(
    '%page_name' => $page_name,
  )) . '</p>';
  $settings = wikitools_404();
  if (!empty($settings['Link to search'])) {
    $output .= theme('wikitools_search_notice', $page_name);
  }
  if (!empty($settings['Link to creation'])) {
    $output .= theme('wikitools_create_notice', $page_name);
  }
  if (!empty($settings['Creation form'])) {
    $output .= theme('wikitools_create', $page_name);
  }
  drupal_set_header('HTTP/1.1 404 Not Found');
  return $output;
}