Summary: How to provide a form or box to allow users to create new pages (deprecated in favour of NewPageBoxPlus)
Version: 4 January 2006
Status: Deprecated
License: GPL2+
Discussion: NewPageBox-Talk?


How can I provide a form or box to allow users to create new pages?


The newpagebox.phpΔ script provides a (:newpagebox:) markup which displays a simple box for creating pages:


(:newpagebox:) allows a number of options:

    base=pagename       -- create page relative to pagename
example: (:newpagebox base=Test.HomePage :)
The new page gets created relative to page Test.HomePage, meaning it gets created in group 'Test'. See Sandbox below. Test.HomePage does not need to exist.

    template=pagename   -- use pagename as template for new page
    label=text          -- use text as button label

example: (:newpagebox label='bowser':)

To install, copy the newpagebox.php file into the cookbook folder, and add the following to config.php:


Enhanced Alternative

As the original this alternative script adds markup to place a simple box with button to enter a new page name and submit it, which will take you to the new page ready to edit it.

This script adds additional functionality: The button can be placed either to the right or the left of the input box. The input box can have an initial text displayed inside the box, which will disappear as soon as the box is clicked to enter the new page name. The input box and button have additional class stylehooks "inputbox" and "inputbutton" which help integrated styling in a skin (used by Gemini Skin? and FixFlow Skin? for instance), i.e. you can use a generic class for both searchbox and newpagebox and other form elements for instance.


Usage is the same as original script, by adding this markup to any wiki page:


Possible parameters to use inside the markup:

  • base=Group.PageName -- create page in the same group as Group.PageName (PageName does not need to exist).
  • template=Group.PageTemplateName -- use Group.PageTemplateName as template for new page.
  • value="Create New Page" -- label or value for the inside of the field, which disappears when clicking the box. Default is empty: "".
  • label="Button Label" -- label for the button, default "Create a new page called:".
  • button=position -- use "left" or "right" to position button (default is "left").

(:newpagebox base=Test.HomePage value="Create New Page" label=Go button=right :)

This creates an input box with "Create New Page" inside, and a button to the right of it with the label "Go". any new page will be created in the group "Test".


Install newpagebox3.phpΔ instead of the original newpagebox.php script. To install, copy the newpagebox3.phpΔ file into the cookbook folder, and add the following to config.php:


Update History


  • newpagebox3.php can be integrated into the sidebar of Gemini?, FixFlow? and Triad Skins? by adding (:newpagebox value="Create New Page" label=Go button=right:) to the SideBar. It will automatically be sized smaller to fit into the SideBar and styled according to the color scheme.
  • The second option is not so good for release to new users, as it prefixes the box with the base pagename (and an arrow) when it is used, which scares them. Could the base page text possibly be omitted? Des 23/10/2005
base=Group.PageName is an optional parameter and does not need to be used, in which case the new page will be created in the current group, unless a Group/ plus PageName is entered. HansB
I agree with Des--the text should not be made to appear beside the box. It absolutely kills my purposes, and I have to go back and use the earlier version. Would really like the right side button, etc. How hard is this thing to fix?. Caveman
  • Entering PmWiki as name into the newpagebox form using a base=Test.HomePage parameter
(:newpagebox base=Test.HomePage:) 

will not create page Test.PmWiki, but redirects to editing PmWiki.PmWiki. Can the base= parameter get priority, before pmwiki looks for a possibly existing page in another group? - HansB

  • This recipe was last tested on PmWiki version: 2.0.beta54
  • This recipe requires at least PmWiki version:

See Also



See discussion at NewPageBox-Talk?


(:newpagebox base=Test.HomePage:)

Launch a new cookbook recipe page:

(:newpagebox base=Cookbook.Cookbook template=Cookbook.Template:)
>>right<< (:newpagebox:)

Creating a page in a non-existing group:

(:newpagebox base=Test7.HomePage label="Create new page in Test7":) 

User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.