Extension:AddBodyClass

From mediawiki.org
Jump to navigation Jump to search
Other languages:
Deutsch • ‎English • ‎Türkçe • ‎français • ‎中文 • ‎日本語
MediaWiki extensions manual
OOjs UI icon advanced.svg
AddBodyClass
Release status: unmaintained
Implementation Parser function
Description Allows adding custom classes to the HTML <body> tag
Author(s) Povilas Kanapickas, Will Stott
Latest version 1.2.0 (2016-03-21)
MediaWiki 1.18
Database changes No
License GNU General Public License 2.0 or later
Download
README
Check usage and version matrix.

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

Usage[edit]

{{#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]

  • Download and place the file(s) in a directory called AddBodyClass in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    require_once "$IP/extensions/AddBodyClass/AddBodyClass.php";
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.