Jump to: navigation, search
Available from version 1.18.0 (r79358)
Called on special pages after the special tab is added but before variants have been added
Define function:
public static function onSkinTemplateNavigation_SpecialPage( SkinTemplate &$sktemplate, array &$links ) { ... }
Attach hook:
$wgHooks['SkinTemplateNavigation::SpecialPage'][] = 'MyExtensionHooks::onSkinTemplateNavigation_SpecialPage';
Called from: File(s): SkinTemplate.php

For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:SkinTemplateNavigation::SpecialPage extensions.


  • &$sktemplate: SkinTemplate object
  • &$links: Structured navigation links

This hook is called just prior to displaying the page navigation links on a Special Page. By modifying &$links you can change the text of the "Special Page" link along with adding other links to the bar.

Default value of $links[edit]

	'namespaces' => [
		'special' => [
			'class' => 'selected',
			'text' => 'Special page',
			'href' => '/wiki/Special:SpecialPageName',
			'context' => 'subject',
	'views' =>  [],
	'actions' =>  [],
	'variants' =>  [],

The following code changes "Special Page" to "My Page" and adds a link to Google.

$links['namespaces']['special']['text'] = 'My Page';

$links['namespaces']['google']['text'] = 'Google';
$links['namespaces']['google']['href'] = '';