Extension:MsInsert

Category:Extensions without an imageCategory:Extensions without a compatibility policyCategory:GPL licensed extensions
MediaWiki extensions manual
MsInsert
Release status: stableCategory:Stable extensions
Implementation User interfaceCategory:User interface extensions
Description Adds a dropdown menu for inserting into the editor the content of certain pages
Author(s) Martin Schwindl, Martin Keyler
Maintainer(s) Sophivorus
Latest version 4.0 (2024-06-17)
MediaWiki 1.39+Category:Extensions with manual MediaWiki version
PHP 8.2+
License GNU General Public License 2.0 or later
Download Category:Extensions in Wikimedia version control
  • $wgTemplates
Quarterly downloads 4 (Ranked 110th)
Translate the MsInsert extension if it is available at translatewiki.net
Category:All extensions

The MsInsert extension adds a dropdown menu to the editor (both the WikiEditor and the regular editor) that allows you to insert into the wikitext the content of any wiki page listed in the dropdown menu.

The wiki pages are added to the dropdown menu from LocalSettings.php.

Installation

  • Download and move the extracted MsInsert folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MsInsert
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'MsInsert' );
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration

To add a page to the dropdown menu, add it to the $wgTemplates array in your LocalSettings.php, like so:

$wgTemplates = [ 'Template:Test', 'Main Page', 'Talk:Main Page' ];

Or alternatively:

$wgTemplates[] = 'Template:Test';
$wgTemplates[] = 'Main Page';
$wgTemplates[] = 'Talk:Main Page';

If the page does not exist yet, then it will not be added to the dropdown menu, even if it's listed in the $wgTemplates array. By default, the array is empty.

Usage

Once a page has been added to the $wgTemplates, it will appear listed in the dropdown menu whenever you edit a page. By selecting it in the dropdown menu, the extension will fetch its contents and insert them into the wikitext, wherever you had the cursor.

See also

Category:All extensions Category:EditPage::showEditForm:initial extensions Category:Extensions in Wikimedia version control Category:Extensions with manual MediaWiki version Category:Extensions without a compatibility policy Category:Extensions without an image Category:GPL licensed extensions Category:ResourceLoaderGetConfigVars extensions Category:Stable extensions Category:User interface extensions