Extension:Header Footer/ja

The Header Footer extension provides per-namespace and per-page header and footer inclusion.

特徴

 * 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

インストール
The recommended way to install this extension is using Composer with MediaWiki's built-in support for.

Change to the base directory of your MediaWiki installation. This is where the "LocalSettings.php" file is located. If you have not yet installed Composer do it now by running the following command in your shell: As of September 2020 that version is the beta, which is incompatible with at least some MediaWiki installations. The stable version is at getcomposer.org/download. If you do not have a "composer.local.json" file yet, create one and add the following content to it:
 * Step 1
 * Step 2

If you already have a "composer.local.json" file add the following line to the end of the "require" section in your file: Remember to add a comma to the end of the preceding line in this section.

Run the following command in your shell: Note if you have Git installed on your system add the --prefer-source flag to the above command. Also note that it may be necessary to run this command twice. If unsure do it twice right away.
 * Step 3

Add the following line to the end of your "LocalSettings.php" file:
 * Step 4


 * Verify installation success

As final step, you can verify Header_Footer got installed by looking at the "Special:Version" page on your wiki and check that it is listed.

Per-Namespace Header and Footer
Edit the pages: 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:

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:

例

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

関連項目

 * 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).