summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorAnika Henke <anika@selfthinker.org>2013-07-21 21:20:44 +0100
committerAnika Henke <anika@selfthinker.org>2013-07-21 21:20:44 +0100
commitc71db656795e82055d114764ad93f71a968a2f28 (patch)
treeaa42f8372326f3248cc5caf986d0197307174c95 /inc
parent8c7670b52dc523860f442a628ae7d226988e96d7 (diff)
downloadrpg-c71db656795e82055d114764ad93f71a968a2f28.tar.gz
rpg-c71db656795e82055d114764ad93f71a968a2f28.tar.bz2
added tpl_classes() to return useful layout classes
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 a87650b84..087e2f9df 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -1748,5 +1748,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 :