Manual:Hooks/SkinTemplateNavigation

From MediaWiki.org
Jump to: navigation, search
SkinTemplateNavigation
Available from version 1.16.0
Alter the structured navigation links in SkinTemplates

*Define function:
function fnMyHook( SkinTemplate &$sktemplate, array &$links ) { ... }

*Attach hook:
$wgHooks['SkinTemplateNavigation'][] = 'MyExtensionHooks::someExample';
Called from: SkinTemplate.php

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


[edit] Details

This is used to alter the navigation for skins which use buildNavigationUrls such as Vector in pre-1.18 skins. In 1.18 this hook is used to generate the tabs for all skins.

This hook is called on content pages only after tabs have been added, but before variants have been added, see the other two SkinTemplateNavigation hooks for other points tabs can be modified at.

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

[edit] See Also

Personal tools
Namespaces
Variants
Actions
Site
Support
Download
Development
Communication
Print/export
Toolbox