Extension:TitlesAndTargets

From Linux Web Expert

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
MediaWiki extensions manual
TitlesAndTargets
Release status: unmaintained
Implementation Parser function
Description Adds two parser functions to identify page titles
Author(s) Werner G. Kaukerat (Wgkderdicketalk)
Latest version 1.0.0
MediaWiki
License GNU General Public License 2.0 or later
Download
Quarterly downloads Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin').
Public wikis using Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin').

The TitlesAndTargets extension adds two parser functions about the page name. The first function returns the title of a page to a given page ID. The second function returns the target page name to a given name of a redirect page.

Installation

  • <translate> <tvar name=1>Download from Github</tvar> and place the file(s) in a directory called <tvar name=name>TitlesAndTargets</tvar> in your <tvar name=ext>extensions/</tvar> folder.</translate>
  • <translate> Add the following code at the bottom of your <tvar name=1>LocalSettings.php </tvar> file:</translate>
    require_once "$IP/extensions/TitlesAndTargets/TitlesAndTargets.php";
    
  • File:OOjs UI icon check-constructive.svg <translate> Done</translate> – <translate> Navigate to <tvar name=special>Special:Version</tvar> on your wiki to verify that the extension is successfully installed.</translate>

Usage

{{#idTitle:pageid}}

Returns the full page title including the namespace addressed by the page ID. An integer value greater than zero is expected as the parameter. Otherwise, an error will occur.

{{#rdTarget:redirect}}

Returns the full page title including the namespace of the target page of a redirect. The name of an existing redirect is expected as the parameter. Otherwise, an error will occur.