Add prebodyhtml template variable
authorjrobson <jrobson@wikimedia.org>
Sat, 8 Mar 2014 01:14:01 +0000 (17:14 -0800)
committerjrobson <jrobson@wikimedia.org>
Thu, 13 Mar 2014 22:51:07 +0000 (15:51 -0700)
Allows the VectorBeta BetaFeature to add HTML underneath the heading

Change-Id: I6d9326d9e84a92b01dee2a29028208ef3f875767

includes/SkinTemplate.php
skins/Vector.php

index 066411d..62d4853 100644 (file)
@@ -398,6 +398,8 @@ class SkinTemplate extends Skin {
                // that interface elements are in a different language.
                $tpl->set( 'userlangattributes', '' );
                $tpl->set( 'specialpageattributes', '' ); # obsolete
+               // Used by VectorBeta to insert HTML before content but after the heading for the page title. Defaults to empty string.
+               $tpl->set( 'prebodyhtml', '' );
 
                if ( $userLangCode !== $wgContLang->getHtmlCode() || $userLangDir !== $wgContLang->getDir() ) {
                        $escUserlang = htmlspecialchars( $userLangCode );
index 899a272..fb2d9ad 100644 (file)
@@ -167,6 +167,7 @@ class VectorTemplate extends BaseTemplate {
                                $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getHtmlCode();
                                $this->text( 'pageLanguage' );
                        ?>"><span dir="auto"><?php $this->html( 'title' ) ?></span></h1>
+                       <?php $this->html( 'prebodyhtml' ) ?>
                        <div id="bodyContent">
                                <?php if ( $this->data['isarticle'] ) { ?>
                                <div id="siteSub"><?php $this->msg( 'tagline' ) ?></div>