Extension:Create Page

From MediaWiki.org
Jump to navigation Jump to search
MediaWiki extensions manual
Crystal Clear action run.svg
Create Page
Release status: beta
Implementation Parser function, User interface
Description Allows placing an input that takes the name of a new page into pages.
Author(s) Jeroen De Dauw, Ike Hecht
Latest version 0.4 (2015-02-23)
MediaWiki 1.18.0+
PHP 5.3+
Database changes No
License GNU General Public License 3.0 or later
$wgCreatePageEditExisting, $wgCreatePageUseVisualEditor
Hooks used
Translate the Create Page extension if it is available at translatewiki.net
Check usage and version matrix.


Create Page requires:

  • MediaWiki 1.18 or above - autocomplete requires version 1.25
  • PHP 5.3 or above


  • Download and place the file(s) in a directory called CreatePage in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    require_once "$IP/extensions/CreatePage/CreatePage.php";
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration parameters[edit]

Defaults to false. Set to true to edit existing pages.
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, in that order.

Most simple usage, which will send the user to ?title=enteredPageName&action=edit&redlink=1, ie create enteredPageName if it does not exist yet.


Create a page in the Course namespace.


A regularly behaving input, but with "Your page name" entered as default value.

{{#createpage:|Your page name}}

Altering the text of the submission button.

{{#createpage:||Create this page!}}

Specifying default content for the page to be created.


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 is a copy of the release notes file on git, which might be more up to date than this page.

These are the release notes for the Create Page extension.

Version 0.4[edit]


  • Added $wgCreatePageEditExisting variable.
  • Added $wgCreatePageUseVisualEditor variable.
  • Added autocomplete to input field.

Version 0.2[edit]


  • Added 4th parameter to add intial text to the created page.
  • Use of wfMessage rather then wfMsg.
  • Explicit references to globals in entry point file.

Version 0.1[edit]


Initial release.


Create Page is fully internationalized. Translation of Create Page messages is done through translatewiki.net. The translation for this extension can be found here. To add language values or change existing ones, you should create an account on translatewiki.net, then request permission from the administrators to translate a certain language or languages on this page (this is a very simple process). Once you have permission for a given language, you can log in and add or edit whatever messages you want to in that language.


Create Page has been written by Jeroen De Dauw as Wikimedia Foundation contractor for the Wikipedia Education Program.

External links[edit]

See also[edit]