From MediaWiki.org
Jump to: navigation, search

MediaWiki extensions manual
Crystal Clear action run.png

Release status: stable

MultiBoilerplate Screenshot.png
Implementation User interface
Description Allows a boilerplate to be selected from a drop down box located above the edit form when editing pages.
Author(s) Robert Leverington, Dror S. [FFS]
Latest version 2.0.0 (2015-03-18)
MediaWiki 1.24+ (use 1.8.0 for MW <= 1.22 )
Database changes No
License GNU General Public License 2.0 or later


  • $wgMultiBoilerplateOptions
  • $wgMultiBoilerplateOverwrite
  • $wgMultiBoilerplateDiplaySpecialPage
Hooks used

Translate the MultiBoilerplate extension if it is available at translatewiki.net

Check usage and version matrix; code metrics


Open tasks · Report a bug

The MultiBoilerplate extension allows a boilerplate to be selected from a dropdown box located above the edit form. By default this shows only on creation of new pages. When loading a boilerplate, it will completely replace whatever text is already in the edit form. See README for more details.

The latest version is 2.0.0, released 2015-03-18. Click for complete release notes. Notable changes:

  • This release is only compatible with MediaWiki 1.24+
  • Code refactored to (hopefully) modern MediaWiki extension standards
  • Handle <onlyinclude> tag in a boilerplate.
  • Add support for optgroups (headers) in the dropdown list

Bugs and feature requests should be added to the extension's project page on Phabricator.

Installation[edit | edit source]

  • Download and place the file(s) in a directory called MultiBoilerplate in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
require_once "$IP/extensions/MultiBoilerplate/MultiBoilerplate.php";

Configuration[edit | edit source]

Main configuration[edit | edit source]

The main configuration is of the available boilerplates; this is done in one of two ways:

  1. through $wgMultiBoilerplateOptions in LocalSettings.php, by filling the $wgMultiBoilerplateOptions array with a list of boilerplate names that correspond to templates, like so:
    $wgMultiBoilerplateOptions[ "My Boilerplate" ] = "Template:My Boilerplate";
    $wgMultiBoilerplateOptions[ "My Other Boilerplate" ] = "Template:My Other Boilerplate";
  2. Through system message MediaWiki:Multiboilerplate, which uses the following format:
    My Boilerplate|Template:My Boilerplate

    You can also create headers inside the dropdown in order to separate boilerplates, by adding level 2 headers. For example:

    == Pretty Templates ==
    * My Boilerplate|Template:My Boilerplate
    == Ugly Templates ==
    * Their Boilerplate|Template:Their Boilerplate

Additional configuration options[edit | edit source]

  • $wgMultiBoilerplateDiplaySpecialPage: false by default. if set to true, will add to the wiki a page named Special:MultiBoilerplates that shows

the currently configured boilerplates. This must be specified before the inclusion of the extension in LocalSettings.php.

  • $wgMultiBoilerplateOverwrite: false by default. If true, shows the boilerplates dropdown even on pre-existing pages. The selected boilerplate will completed overwrite the current contents.

Changelog[edit | edit source]

For a change log of previous versions, see HISTORY.

See also[edit | edit source]