Skip to content

Commit

Permalink
Added additional include hooks to easily extend the navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
splitbrain committed Jan 3, 2023
1 parent 9d42445 commit 9510c08
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Template.php
Expand Up @@ -69,6 +69,8 @@ public function registerIncludes(\Doku_Event $event) {
$event->data['footer'] = 'Footer below the page content';
$event->data['sidebarfooter'] = 'Footer below the sidebar';
$event->data['sidebarheader'] = 'Header above the sidebar';
$event->data['navtop'] = 'Additional navigation items at the top';
$event->data['navbottom'] = 'Additional navigation items at the bottom';
}

/**
Expand Down Expand Up @@ -141,7 +143,10 @@ public function getNavigation() {
$nav .= '<script type="application/javascript">
document.getElementsByClassName("nav-main")[0].style.visibility = "hidden";
</script>';

$nav .= $this->getInclude('navtop');
$nav .= tpl_include_page($conf['sidebar'], false, true);
$nav .= $this->getInclude('navbottom');
$nav .= '</nav>';
}

Expand Down

0 comments on commit 9510c08

Please sign in to comment.