Extension:Header Footer
Appearance
(Redirected from Extension:HeaderFooter)
HeaderFooter Release status: stable |
|
---|---|
Description | Allows content to be included at the top and bottom of the wiki's page content section |
Author(s) | Jean-Lou Dupont, James Montalvo, Douglas Mason, Hallo Welt! GmbH |
Latest version | 4.0 |
Compatibility policy | For every MediaWiki release that is a Long Term Support release there is a corresponding branch in the extension. |
MediaWiki | 1.39+ |
Database changes | No |
Composer | mediawiki/header-footer |
License | GNU General Public License 2.0 or later |
Download | |
|
|
Translate the Header Footer extension if it is available at translatewiki.net | |
The Header Footer extension allows content to be included at the top and bottom of the wiki's page content section per namespace and per page.
Features
[edit]- Speed - integrated with parser caching
- Secure - header and footer articles are located in the NS_MEDIAWIKI namespace
- Controllable - headers and/or footers can be disabled on pages which are edit protected
- Customizable - headers and footers are wrapped in
<div>
elements
Installation
[edit]- Download and move the extracted
HeaderFooter
folder to yourextensions/
directory.
Developers and code contributors should install the extension from Git instead, using:cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/HeaderFooter - Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'HeaderFooter' );
- Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Usage
[edit]Per-Namespace Header and Footer
[edit]Edit the pages:
MediaWiki:Hf-nsheader-namespace name
MediaWiki:Hf-nsfooter-namespace name
namespace name
must be in the language of the wiki (see Manual:$wgLanguageCode)
For the 'main' namespace, just use blank i.e. no string, but with the hyphen:
MediaWiki:Hf-nsheader-
MediaWiki:Hf-nsfooter-
Per-Page Header and Footer
[edit]Edit the pages:
MediaWiki:Hf-header-page name
MediaWiki:Hf-footer-page name
Disable commands
[edit]On edit protected pages, one can add
__NOHEADER__
to suppress the page level header__NOFOOTER__
to suppress the page level footer__NONSHEADER__
to suppress the namespace level header__NONSFOOTER__
to suppress the namespace level footer
CSS
[edit]- Page Level Header: <div class="hf-header">
- Namespace Level Header: <div class="hf-nsheader">
- Page Level Footer: <div class="hf-footer">
- Namespace Level Footer: <div class="hf-nsfooter">
Examples
[edit]- Page MediaWiki:hf-nsheader-Extension would contain the wikitext to be included as header for all pages of the Extension namespace.
- In this case, to suppress the header of the page Extension:HeaderFooter one should a) edit protect it, and b) add
__NONSHEADER__
in it.
- In this case, to suppress the header of the page Extension:HeaderFooter one should a) edit protect it, and b) add
- Page MediaWiki:hf-footer-Extension:HeaderFooter would contain the wikitext to be included as footer for the page Extension:HeaderFooter.
- In this case, to suppress the footer of the page Extension:HeaderFooter one should a) edit protect it, and b) add
__NOFOOTER__
in it.
- In this case, to suppress the footer of the page Extension:HeaderFooter one should a) edit protect it, and b) add
See also
[edit]- PageNotice extension – provides a way for you to define fixed notice messages for the top or the bottom of a page (by individual page name), or entire namespaces (by namespace number).
This extension is included in the following wiki farms/hosts and/or packages: This is not an authoritative list. Some wiki farms/hosts and/or packages may contain this extension even if they are not listed here. Always check with your wiki farms/hosts or bundle to confirm. |
Categories:
- Stable extensions
- Extensions with invalid or missing type
- Extensions supporting Composer
- GPL licensed extensions
- Extensions in Wikimedia version control
- OutputPageParserOutput extensions
- ResourceLoaderGetConfigVars extensions
- All extensions
- Extensions included in BlueSpice
- Extensions included in Canasta
- Extensions included in ProWiki
- View page extensions
- Headers and footers extensions