diff --git a/syntax.php b/syntax.php
index 5f8ec80..851d4a3 100644
--- a/syntax.php
+++ b/syntax.php
@@ -106,18 +106,27 @@ class syntax_plugin_navigation extends DokuWiki_Syntax_Plugin {
$output = '';
foreach ($node->getNodes() as $node) {
/** @var DokuWikiNode $node */
+ if ($node->getName() == 'start')
+ continue;
$title = (strlen($node->getMetaData('title')) > 0 ? $node->getMetaData('title') : $node->getName());
$access = auth_quickaclcheck($node->getFullID());
if ($node instanceof DokuWikiPage) {
if ($access > 0) {
- $output .= '
' . $title . '';
+ $output .= '' . $title . '' . PHP_EOL;
}
} else if($node instanceof DokuWikiNameSpace) {
/** @var DokuWikiNameSpace $node */
if ($this->depth <= $this->maxDepth) {
if ($access > 0) {
- $output .= '' . $title . '' . $this->RenderNodes($node) . '
';
+ // lets check if the the namespace has a startpage and if yes link to it
+ if ($start = $node->hasChild('start')) {
+ $access = auth_quickaclcheck($start->getFullID());
+ if ($access > 0) {
+ $title = '' . (strlen($node->getMetaData('title')) > 0 ? $node->getMetaData('title') : $node->getName()) . '';
+ }
+ }
+ $output .= '' . $title . '' . $this->RenderNodes($node) . '
' . PHP_EOL;
}
}
}