Extension:AddBodyClass

From MediaWiki.org
(Redirected from Extension:AddBodyTags)
Jump to: navigation, search
MediaWiki extensions manual - list
Crystal Clear action run.png
AddBodyClass

Release status: stable

Implementation Parser function
Description Allows to add custom classes to the HTML <body> tag
Author(s) Povilas Kanapickas (P12talk)
Latest version 1.1 (2013-04-25)
MediaWiki 1.18 - 1.21
Database changes No
License GPLv2+
Download Project page

Git [Help]
Commit history
Note:
No localisation updates are provided by translatewiki.net.

README]

Hooks used
ParserFirstCallInit

OutputPageBodyAttributes
OutputPageBeforeHTML

Translate the AddBodyClass extension if possible

Check usage and version matrix; code metrics

The AddBodyClass extension allows to add custom classes to the HTML <body> tag.

Usage[edit | edit source]

{{#addbodyclass:your_class}}

This will append 'your_class' to the contents of the `class' attribute of <body> class. You can append multiple classes using {{#addbodyclass:your_class1 your_class2 your_class3}}

Installation[edit | edit source]

  • Download] and extract the files in a directory called AddBodyClass in your extensions/ folder. If you're a developer and this extension is in a Git repository, then instead you should clone the repository.
  • Add the following code at the bottom of your LocalSettings.php:
require_once( "$IP/extensions/AddBodyClass/AddBodyClass.php" );
  • Done! Navigate to "Special:Version" on your wiki to verify that the extension is successfully installed.