Summary: How to add new pages without creating a link first
Prerequisites: Last tested on PmWiki version: 2.beta26
Discussion: AddPageForm-Talk
Categories: Forms, Links


How can we add pages without creating broken links first?


The question mark links which appear on some pages and point to non-existing other pages are not broken links, they are invitations to create a new page. They are also a good way for people to check that they spelled properly the page names.

However, to answer the question, there are two ways: default and automatic.

Wiki default

Just edit the URI in the Address field in the browser to place the name of the new page (or group) in the right position, e.g.:


Automatic, using a form

However, if you don't want to let your users get their hands dirty and possibly mess up the URI, add the following to the top of your local/config.php:

if ($_GET['createfrom']!="") {
$CreatePageForm='<form action="'.$ScriptUrl.'">
  <input type="text" name="n" value="NameOfThePage" />
  <input type="hidden" name="action" value="edit" />
  <input type="hidden" name="createfrom" value="'.$pagename.'" />
  <input type="submit" name="submit" value="Create" />

Then you can put the new markup (:createpage:) in a skin, template, included page or in pages where you want people to see the form: one text field followed by a Create button.

Typing the name of a new page in the text field and pressing Create opens the edit page on the new page.

See Also


  • Nils Knappmeier
  • Radu (put this page up and made some comments :)

See also




See discussion at AddPageForm-Talk