diff --git a/syntax.php b/syntax.php index ec96be5..362a4b1 100644 --- a/syntax.php +++ b/syntax.php @@ -38,7 +38,7 @@ class syntax_plugin_navigation extends DokuWiki_Syntax_Plugin { } function connectTo ($mode) { - $this->Lexer->addSpecialPattern('{{indexmenu_n>(\d+)}}',$mode,'plugin_navigation'); + $this->Lexer->addSpecialPattern('{{indexmenu>.+?}}',$mode,'plugin_navigation'); $this->Lexer->addSpecialPattern ('\[Navigation\]', $mode, 'plugin_navigation'); } @@ -70,15 +70,16 @@ class syntax_plugin_navigation extends DokuWiki_Syntax_Plugin { } }); - $content = ''; + } // $data is what the function handle return'ed. if ($mode == 'xhtml') { @@ -87,4 +88,17 @@ class syntax_plugin_navigation extends DokuWiki_Syntax_Plugin { } return false; } + + private function RenderNodes(DokuWikiNameSpace $node) { + $output = ''; + foreach ($node->getNodes() as $node) { + /** @var DokuWikiNode $node */ + if ($node instanceof DokuWikiPage) { + $output .= '
  • ' . $node->getName() . '
  • '; + } else { + $output .= '
  • ' . $node->getName() . '
  • '; + } + } + return $output; + } } \ No newline at end of file