Manual:Hooks/BaseTemplateAfterPortlet
Appearance
This feature was removed from MediaWiki core in version 1.40.0 (after being deprecated in 1.35.0). Please see SkinAfterPortlet for an alternative way to use this feature. |
BaseTemplateAfterPortlet | |
---|---|
Available from version 1.23.0 Removed in version 1.40.0 (Gerrit change 860937) Occurs whenever a page is rendered and allows to add HTML after portlets have been put out. | |
Define function: | public static function onBaseTemplateAfterPortlet( $template, $portlet, &$html ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"BaseTemplateAfterPortlet": "MediaWiki\\Extension\\MyExtension\\Hooks::onBaseTemplateAfterPortlet"
}
}
|
Called from: | File(s): SkinTemplate.php |
Interface: | BaseTemplateAfterPortletHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:BaseTemplateAfterPortlet extensions.
After output of portlets, allow injecting custom HTML after the section. Any uses of the hook need to handle escaping.
Details
[edit]$template
: An instance ofBaseTemplate
$portlet
: Astring
representing portlet name&$html
: Astring
The HTML code to display. Will be wrapped into a<div>
tag, but apart from that will be output into the page directly. Escape dangerous signs!