The Create Page extension allows you to insert an input that takes the name of a new page into pages.
CreatePage
folder to your extensions/
directory.cd extensions/ git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/CreatePage
wfLoadExtension( 'CreatePage' );
$wgCreatePageEditExisting
false
. Set to true
to edit existing pages.
$wgCreatePageUseVisualEditor
false
. Set to true
to redirect to VisualEditor for page creation.
The input is placed using the #createpage
parser function. It accepts 3 optional arguments. Namespace, default page name, and submission button text are in that order.
Most simple usage, which will send the user to ?title=enteredPageName&action=edit&redlink=1
, i.e., create "enteredPageName" if it does not exist.
Create a page in the Course namespace:
A regularly behaving input, but with "Your page name" entered as the default value:
{{#createpage:|Your page name}}
Altering the text of the submission button:
{{#createpage:||Create this page!}}
Specifying the default content for the page to be created:
{{#createpage:|||Template:ScaffoldTemplateNameHere}}
Display the input on the same line as some text:
<p style="display:inline">Enter the name for a new course:</p> {{#createpage:Course||Create course}}
This extension was written by Jeroen De Dauw as a Wikimedia Foundation contractor for the Wikipedia Education Program.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4