Extension:Header Footer

Purpose
Provides per-namespace and per-page header and footer inclusion.

Features

 * 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  elements

MediaWiki 1.22+
Install with Composer by performing one of the following commands
 * for the latest stable version or
 * for the latest development version

No changes to LocalSettings.php are required when installing with Composer.

MediaWiki 1.21+
If you are familiar with git and have shell access to your server, you can obtain the extension, with all its tags and branches, as follows:

Require in LocalSettings.php
When not installing with Composer, make the following modification to LocalSettings.php.

Download the files as described above, put them in your MediaWiki extensions folder, then include this line in your LocalSettings.php file:

Per-Namespace Header and Footer
Edit the pages: For the 'main' namespace, just use blank i.e. no string, but with the hyphen:

Per-Page Header and Footer
Edit the pages:

Disable commands
On edit protected pages, one can add
 * to suppress the page level header
 * to suppress the page level footer
 * to suppress the namespace level header
 * to suppress the namespace level footer

CSS

 * Page Level Header:
 * Namespace Level Header:
 * Page Level Footer:
 * Namespace Level Footer:

Examples

 * 1) Page MediaWiki:hf-nsheader-Extension would contain the wikitext to be included as header for all pages of the Extension namespace.
 * 2) * In this case, to suppress the header of the page Extension:HeaderFooter one should a) edit protect it, and b) add  in it.
 * 3) Page MediaWiki:hf-footer-Extension:HeaderFooter would contain the wikitext to be included as footer for the page Extension:HeaderFooter.
 * 4) * In this case, to suppress the footer of the page Extension:HeaderFooter one should a) edit protect it, and b) add  in it.

Dependency
Versions for MediaWiki 1.17 and below are dependent upon the StubManager extension. That dependency has been removed for MediaWiki 1.21+.

Release History

 * 2.0.0: Complete redesign --Jean-Lou Dupont
 * 2.0.1: Fixed bug related to disable keywords (e.g. __NONSFOOTER__) --Jean-Lou Dupont
 * 2.0.2: Updated to work with MW 1.21 and removed StubManager dependency. Moved revision control from SVN to GitHub. --James Montalvo
 * 2.1.0: Updated to allow installation via Composer --James Montalvo
 * 2.1.1: Convert deprecated msg formats; code format cleanup --James Montalvo