Extension:AddBodyClass

From MediaWiki.org
(Redirected from Extension:AddBodyTags)
Jump to: navigation, search
Language: English
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.png
AddBodyClass

Release status:Extension status stable

ImplementationTemplate:Extension#type Parser function
DescriptionTemplate:Extension#description Allows to add custom classes to the HTML <body> tag
Author(s)Template:Extension#username Povilas Kanapickas (P12talk)
Latest versionTemplate:Extension#version 1.1 (2013-04-25)
MediaWikiTemplate:Extension#mediawiki 1.18 - 1.21
Database changesTemplate:Extension#needs-updatephp No
LicenseTemplate:Extension#license GNU General Public License 2.0 or later
Download
README]
Hooks usedTemplate:Extension#hook
ParserFirstCallInit
OutputPageBodyAttributes
OutputPageBeforeHTML

Translate the AddBodyClass extension if it is available at translatewiki.net

Check usage and version matrix.

The AddBodyClass extension allows to add 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";
  • YesY Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.