From 5ce0007a7c2971617b003b17b507d81ed827236d Mon Sep 17 00:00:00 2001 From: Tim Schumacher Date: Fri, 6 Jun 2014 11:31:33 +0200 Subject: [PATCH] If we finished rendering a subtree we need to decrease the current depth. Also if we dont render a subtree at least try to render the namespace as a normal page. --- syntax.php | 10 ++++++++++ 1 file changed, 10 insertions(+) mode change 100644 => 100755 syntax.php diff --git a/syntax.php b/syntax.php old mode 100644 new mode 100755 index cfad11c..a9a09e0 --- a/syntax.php +++ b/syntax.php @@ -145,6 +145,16 @@ class syntax_plugin_navigation extends DokuWiki_Syntax_Plugin } } $output .= '
  • ' . $title . '
  • ' . PHP_EOL; + $this->depth--; + } + } else { + // if we have reached the maximum depth, lets at least check if the namespace has a starting page and display this + if ($start = $node->hasChild('start')) { + $access = auth_quickaclcheck($start->getFullID()); + if ($access > 0) { + $title = (strlen($start->getMetaData('title')) > 0 ? $start->getMetaData('title') : $start->getName()); + $output .= '
  • ' . $title . '
  • ' . PHP_EOL; + } } } }