If the search is fruitless, or actually the person is an admin of some sort and wants to add a new page, its nice to have a link. If you have the prepopulate module, something as simple as this at the end of the search404_page function is just about all you need:

if (user_access('administer nodes') ) {
$output .= "


".t("Add a new page for this URL")." (".$_REQUEST['destination'].")

";
}

Comments

markfoodyburton’s picture

Sorry - here's the code

if (user_access('administer nodes') ) {
  $output .= "<hr><p> <a href=/node/add/page?edit[path][path]=".
  $_REQUEST['destination']."&edit[title]=".
  $_REQUEST['destination'].">".
  t("Add a new page for this URL").
  " (".$_REQUEST['destination'].")</a></p>";
}
forngren’s picture

Status: Needs work » Postponed

This will probably now be implemented for a while. The UI is already mesed up. That is, if not someone steps up makes a good patch/diff.

You could perhaps usehttp://drupal.org/project/wikitools

forngren’s picture

This will probably now be implemented for a while.

That should of course read

This will probably not be implemented for a while.

zyxware’s picture

Status: Postponed » Closed (won't fix)

It might not make sense to add a new node for an erroneous URL or when a URL alias is incorrectly typed. If it is a URL alias you would not have any idea as to what type of node it is. So I think that this does not have to be added to this module. If you disagree please do explain why.