diff options
author | Anika Henke <anika@selfthinker.org> | 2013-11-17 12:41:21 -0800 |
---|---|---|
committer | Anika Henke <anika@selfthinker.org> | 2013-11-17 12:41:21 -0800 |
commit | c77971973148991b27bd759146b195f39d797f45 (patch) | |
tree | bbdc6d4bb318acc14dcae5a11145bb6de2c0cd40 /lib/tpl/dokuwiki/main.php | |
parent | 2936e40c9a0605a1bd87fedbc119d4d1959e5544 (diff) | |
parent | f8cadb6a04d3c1c201dd77627c89bd1c0efcac51 (diff) | |
download | rpg-c77971973148991b27bd759146b195f39d797f45.tar.gz rpg-c77971973148991b27bd759146b195f39d797f45.tar.bz2 |
Merge pull request #427 from splitbrain/improve_template_event
Improved pagetools event in dokuwiki template
Diffstat (limited to 'lib/tpl/dokuwiki/main.php')
-rw-r--r-- | lib/tpl/dokuwiki/main.php | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/lib/tpl/dokuwiki/main.php b/lib/tpl/dokuwiki/main.php index f6ca4ed86..3bc46406a 100644 --- a/lib/tpl/dokuwiki/main.php +++ b/lib/tpl/dokuwiki/main.php @@ -75,22 +75,21 @@ $showSidebar = $hasSidebar && ($ACT=='show'); <ul> <?php $data = array( - 'edit' => tpl_action('edit', 1, 'li', 1, '<span>', '</span>'), - 'revert' => tpl_action('revert', 1, 'li', 1, '<span>', '</span>'), - 'revisions' => tpl_action('revisions', 1, 'li', 1, '<span>', '</span>'), - 'backlink' => tpl_action('backlink', 1, 'li', 1, '<span>', '</span>'), - 'subscribe' => tpl_action('subscribe', 1, 'li', 1, '<span>', '</span>'), - 'top' => tpl_action('top', 1, 'li', 1, '<span>', '</span>') + 'view' => 'main', + 'items' => array( + 'edit' => tpl_action('edit', 1, 'li', 1, '<span>', '</span>'), + 'revert' => tpl_action('revert', 1, 'li', 1, '<span>', '</span>'), + 'revisions' => tpl_action('revisions', 1, 'li', 1, '<span>', '</span>'), + 'backlink' => tpl_action('backlink', 1, 'li', 1, '<span>', '</span>'), + 'subscribe' => tpl_action('subscribe', 1, 'li', 1, '<span>', '</span>'), + 'top' => tpl_action('top', 1, 'li', 1, '<span>', '</span>') + ) ); // the page tools can be amended through a custom plugin hook - // if you're deriving from this template and your design is close enough to - // the dokuwiki template you might want to trigger a DOKUWIKI event instead - // of using $conf['template'] here - $hook = 'TEMPLATE_'.strtoupper($conf['template']).'_PAGETOOLS_DISPLAY'; - $evt = new Doku_Event($hook, $data); + $evt = new Doku_Event('TEMPLATE_PAGETOOLS_DISPLAY', $data); if($evt->advise_before()){ - foreach($evt->data as $k => $html) echo $html; + foreach($evt->data['items'] as $k => $html) echo $html; } $evt->advise_after(); unset($data); |