diff --git a/main.php b/main.php index 05a6959..5ca07c3 100644 --- a/main.php +++ b/main.php @@ -63,19 +63,23 @@ $showSidebar = page_findnearest($conf['sidebar']) && ($ACT=='show');

@@ -85,11 +89,11 @@ $showSidebar = page_findnearest($conf['sidebar']) && ($ACT=='show');

@@ -145,15 +149,15 @@ $showSidebar = page_findnearest($conf['sidebar']) && ($ACT=='show');

diff --git a/tpl_functions.php b/tpl_functions.php index 97644e2..e0a5ebf 100644 --- a/tpl_functions.php +++ b/tpl_functions.php @@ -82,6 +82,25 @@ function _tpl_action($type, $link=0, $wrapper=0) { } } +/** + * Create event for tools menues + * + * @author Anika Henke + */ +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(); +} + /** * copied from core * @todo: remove when it's available in stable (autumn 2013)