Extension:PageMagic

This extension is professionally maintained by the WikiTeq team.
WikiTeq provides official support for MediaWiki LTS releases only. It may work with other MediaWiki releases.
MediaWiki extensions manual
PageMagic
Release status: stable
Description The extension adds a few parser functions to retrieve page id by name and vice versa.
Author(s) Vedmaka (vedmakatalk)
Maintainer(s) WikiTeq team
Compatibility policy For every MediaWiki release that is a Long Term Support release there is a corresponding branch in the extension.
MediaWiki 1.31+
License GNU General Public License 2.0 or later
Download
README
Quarterly downloads 0
Translate the PageMagic extension if it is available at translatewiki.net
Issues Open tasks · Report a bug

The PageMagic extension adds a few parser functions to retrieve page id by name and vice versa.

This extension was created for WikiWorks.

Installation

edit
  • Download and move the extracted PageMagic 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/PageMagic
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'PageMagic' );
    
  •   Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Usage

edit

The following magic words are introduced:

  • FULLPAGENAMEFROMID - converts provided page id into a full page name
  • PAGEIDFROMREVISIONID - converts provided revision id into a page id
  • FULLPAGENAMEFROMREVISIONID - converts provided revision id into a full page name

Examples:

{{FULLPAGENAMEFROMID:12345}} -> Namespace:Pagename
{{PAGEIDFROMREVISIONID:3456}} -> 12345
{{FULLPAGENAMEFROMREVISIONID:3456}} -> Namespace:Pagename

Also, see the README