diff options
author | Szymon Olewniczak <szymon.olewniczak@rid.pl> | 2013-12-10 09:19:46 +0100 |
---|---|---|
committer | Szymon Olewniczak <szymon.olewniczak@rid.pl> | 2013-12-10 09:19:46 +0100 |
commit | 362a4f084345b496ab6b155db3ec50cad3939d0e (patch) | |
tree | daef57515dd6f25fcd823818b813dea786897757 /inc | |
parent | 8c4759c9d38a21eb352498a8035944ee019e7738 (diff) | |
download | rpg-362a4f084345b496ab6b155db3ec50cad3939d0e.tar.gz rpg-362a4f084345b496ab6b155db3ec50cad3939d0e.tar.bz2 |
add TEMPLATE_SITETOOLS_DISPLAY and TEMPLATE_USERTOOLS_DISPLAY basing on Starter template
Diffstat (limited to 'inc')
-rw-r--r-- | inc/template.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/inc/template.php b/inc/template.php index 60e178d1a..fb468d041 100644 --- a/inc/template.php +++ b/inc/template.php @@ -1786,5 +1786,24 @@ function tpl_classes() { return join(' ', $classes); } +/** + * Create event for tools menues + * + * @author Anika Henke <anika@selfthinker.org> + */ +function tpl_toolsevent($toolsname, $items, $view='main') { + $data = array( + 'view' => $view, + 'items' => $items + ); + + $hook = 'TEMPLATE_'.strtoupper($toolsname).'_DISPLAY'; + $evt = new Doku_Event($hook, $data); + if($evt->advise_before()){ + foreach($evt->data['items'] as $k => $html) echo $html; + } + $evt->advise_after(); +} + //Setup VIM: ex: et ts=4 : |