diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2016-04-27 21:13:26 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2016-04-27 21:13:26 (GMT) |
commit | a69a107a3597eb2b31458593a415fcbccf0eda8b (patch) | |
tree | 3ce0970d3ad47545e2a008c2fd5604c49b4cd3e5 /Toha.skin.php | |
parent | 7cd8ce6cce8ebfa940c1e1419186bce1f122b027 (diff) |
Identified the main page using a CSS selector.
Diffstat (limited to 'Toha.skin.php')
-rw-r--r-- | Toha.skin.php | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/Toha.skin.php b/Toha.skin.php index 26a7ea6..e4cb89a 100644 --- a/Toha.skin.php +++ b/Toha.skin.php @@ -18,7 +18,7 @@ class SkinToha extends SkinTemplate { $template = 'TohaTemplate', $useHeadElement = true; /** - * initialize the page + * Initialize the page */ public function initPage( OutputPage $out ) { parent::initPage( $out ); @@ -40,7 +40,7 @@ class SkinToha extends SkinTemplate { } /** - * initialize various variables and generate the template + * Initialize various variables and generate the template * * @since 1.23 * @return QuickTemplate The template to be executed by outputPage @@ -53,6 +53,22 @@ class SkinToha extends SkinTemplate { } + /** + * Override the creation of the "<body>" tag to add attributes. + * + * @param Title $title + */ + function getPageClasses( $title ) { + + $list = parent::getPageClasses( $title ); + + if ( $title->isMainPage() ) + $list .= ' main_page'; + + return $list; + + } + } /** |