Manual:Hooks/SkinTemplateOutputPageBeforeExec
From MediaWiki.org
| SkinTemplateOutputPageBeforeExec | |
|---|---|
| Available from version 1.10.0 (r19063) allows further setup of the template engine after all standard setup has been performed but before the skin has been rendered |
|
*Define function: |
function fnMyHook( &$sk, &$tpl ) { ... }
|
*Attach hook: |
$wgHooks['SkinTemplateOutputPageBeforeExec'][] = 'MyExtensionHooks::someExample'; |
| Called from: | SkinTemplate.php |
*For more information about attaching hooks, see Manual:Hooks.
*For examples of extensions using this hook, see Category:SkinTemplateOutputPageBeforeExec extensions.
[edit] Example
$wgHooks['SkinTemplateOutputPageBeforeExec'][] = 'lfSkinTemplateOutputPageBeforeExec'; function lfSkinTemplateOutputPageBeforeExec( $sk, &$tpl ) { $tpl->set( 'key', 'value' ); $someVar = 'asdf'; $tpl->setRef( 'key', $someVar ); $tpl->data['key']; return true; }
