|
Cookbook /
NewPageBoxSummary: How to provide a form or box to allow users to create new pages
Version: 4 January 2006
Prerequisites:
Status:
Maintainer:
QuestionHow can I provide a form or box to allow users to create new pages? AnswerThe newpagebox.phpΔ script provides a
base=pagename -- create page relative to pagename
template=pagename -- use pagename as template for new page
label=text -- use text as button label
example: 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. UseUsage is the same as original script, by adding this markup to any wiki page:
Possible parameters to use inside the markup:
Example: 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". InstallationInstall 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
Notes and Comments
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
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
See AlsoContributorsSandbox
Launch a new cookbook recipe page:
Creating a page in a non-existing group:
|