Jump to content

Gadget:Subpages

From mediawiki.org

Subpages is a global gadget that allows to navigate subpages through a collapsible menu.

Installation

[edit]

If Subpages is already available as a gadget in your wiki, simply go to the gadgets tab in your preferences and enable it. If not, then add the following to your common.js in the wiki where you want it available (Wikimedia or not) or to your global.js if you want it available in every Wikimedia wiki:

/**
 * Subpages allows to navigate subpages through a collapsible menu
 * Documentation: https://www.mediawiki.org/wiki/Gadget:Subpages
 * Source code: https://www.mediawiki.org/wiki/MediaWiki:Gadget-Global-Subpages.js
 */
mw.loader.load( '//www.mediawiki.org/w/load.php?modules=ext.gadget.Global-Subpages' );

If you'd like to make Subpages available as a gadget in your wiki, first create MediaWiki:Gadget-Subpages.js with the code above. Then create MediaWiki:Gadget-Subpages with a short description of the tool. Finally, add the following to MediaWiki:Gadgets-definition (see Extension:Gadgets#Usage for details):

* Subpages[ResourceLoader|namespaces=0]|Subpages.js

Usage

[edit]

Once installed, simply go to any page and click the button that will appear to the right of every page title.

Contribute

[edit]

To contribute translations, edit Commons:Data:Gadget-Subpages.tab directly.

Development is done on-wiki. Copy the source code to your common.js, start hacking and contact the author when ready to merge.

See also

[edit]