You are here

function theme_wikitools_page_does_not_exist in Wikitools 7

Same name and namespace in other branches
  1. 5 wikitools.module \theme_wikitools_page_does_not_exist()
  2. 6 wikitools.pages.inc \theme_wikitools_page_does_not_exist()

@todo Please document this function.

See also

http://drupal.org/node/1354

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 160
Page callbacks for wikitools pages.

Code

function theme_wikitools_page_does_not_exist($variables) {
  $page_name = $variables['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', array(
      'page_name' => $page_name,
    ));
  }
  if (!empty($settings['Link to creation'])) {
    $output .= theme('wikitools_create_notice', array(
      'page_name' => $page_name,
    ));
  }
  if (!empty($settings['Creation form'])) {
    $output .= theme('wikitools_create', array(
      'page_name' => $page_name,
    ));
  }
  drupal_add_http_header('Status', '404 Not Found');
  return $output;
}