Extension:Create Page

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual
Crystal Clear action run.png
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 or higher
PHP 5.3 or above
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; code metrics


Open tasks · Report a bug

Requirements[edit | edit source]

Create Page requires:

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

Installation[edit | edit source]

  • 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";
  • YesY Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration parameters[edit | edit source]

Defaults to false. Set to true to edit existing pages.
Set to true to redirect to VisualEditor for page creation..

Usage[edit | edit source]

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.

{{#createpage:|||Add some content here}}

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}}

Version[edit | edit source]

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 | edit source]


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

Version 0.2[edit | edit source]


  • 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 | edit source]


Initial release.

Internationalization[edit | edit source]

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.

Authors[edit | edit source]

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

External links[edit | edit source]

See also[edit | edit source]