Open main menu

Extension:PageTools

UsageEdit

  • {{#pageincategory: 'category' }}
returns 'true' if the current page is categorised with 'category'
  • {{#pagenumcategories:}}
returns the number of categories found for the current page.
  • {{#pagecategory: 'index' }}
returns the category title indexed with 'index'
  • {{#pagetitle: new title name }}
changes the displayed page title
  Note: does NOT change the title under which the page is stored in the wiki, you have to move the page for that
  • {{#pagetitleadd: text to be added to the title name }}
adds the given text to the displayed page title
  • {{#pagesubtitle: text to be added to the page's subtitle }}
adds the given text to the displayed subtitle (the area where e.g. relocation information is usually displayed)

InstallationEdit

$IP stands for the Installation Path (or "directory") of your MediaWiki installation, the same directory that holds LocalSettings.php, index.php etc..
  1. Download version 2.2.0 or the current development version
    Alternatively you can clone PageTools using git
  2. Extract the files to the $IP/extensions/PageTools directory
  3. Add to the end of LocalSettings.php:
    require_once "$IP/extensions/PageTools/PageTools.php";
    
  4. Go to the Special:Version page of your wiki and verify that an entry for PageTools exists

The current version of the extension works for MediaWiki version 1.22 onwards and is probably also compatible with earlier versions. However, if you use a very old version of MediaWiki and the current version of this extension does not work for you, try installing version 1.1. See [1] for documentation.