summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorChristopher Smith <chris@jalakai.co.uk>2013-08-01 10:55:52 -0700
committerChristopher Smith <chris@jalakai.co.uk>2013-08-01 10:55:52 -0700
commit806bda372823b324cbea945421fdc17d0a6e062e (patch)
tree52d129d5a33bd9a61c107e5d8402d063c20dfc23 /inc
parent5dba76ffbaa5c62670385d1a3c325c72db3f6c64 (diff)
parent39f00629c3ce90b643728a3afa5ee7c74faa481c (diff)
downloadrpg-806bda372823b324cbea945421fdc17d0a6e062e.tar.gz
rpg-806bda372823b324cbea945421fdc17d0a6e062e.tar.bz2
Merge pull request #194 from splitbrain/loggedin-class
added loggedIn class to main tpl container
Diffstat (limited to 'inc')
-rw-r--r--inc/template.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/inc/template.php b/inc/template.php
index 7309c9b32..66cbbe471 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -1746,5 +1746,23 @@ function tpl_media() {
echo '</div>'.NL;
}
+/**
+ * Return useful layout classes
+ *
+ * @author Anika Henke <anika@selfthinker.org>
+ */
+function tpl_classes() {
+ global $ACT, $conf, $ID, $INFO;
+ $classes = array(
+ 'dokuwiki',
+ 'mode_'.$ACT,
+ 'tpl_'.$conf['template'],
+ $_SERVER['REMOTE_USER'] ? 'loggedIn' : '',
+ $INFO['exists'] ? '' : 'notFound',
+ ($ID == $conf['start']) ? 'home' : '',
+ );
+ return join(' ', $classes);
+}
+
//Setup VIM: ex: et ts=4 :