diff options
Diffstat (limited to 'inc')
-rw-r--r-- | inc/template.php | 18 |
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 : |