From 809799f84c8ab79acc6bf14dabf2c82ba8ed4df2 Mon Sep 17 00:00:00 2001 From: Tim Schumacher Date: Tue, 10 Dec 2013 21:24:09 +0100 Subject: [PATCH] Add a status indicator for the sortorder. --- syntax.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/syntax.php b/syntax.php index 48fbcc5..5f8ec80 100644 --- a/syntax.php +++ b/syntax.php @@ -43,7 +43,7 @@ class syntax_plugin_navigation extends DokuWiki_Syntax_Plugin { } function connectTo ($mode) { - $this->Lexer->addSpecialPattern('{{indexmenu>.+?}}',$mode,'plugin_navigation'); + $this->Lexer->addSpecialPattern('{{indexmenu_n>.+?}}',$mode,'plugin_navigation'); $this->Lexer->addSpecialPattern ('\[Navigation\]', $mode, 'plugin_navigation'); } @@ -52,6 +52,15 @@ class syntax_plugin_navigation extends DokuWiki_Syntax_Plugin { } function render ($mode, &$renderer, $data) { + if (preg_match('/{{indexmenu_n>(\d+)}}/',$data[0],$matches)) { + global $ACT, $INFO; + if($INFO['isadmin'] && $ACT == 'show') { + ptln('
'); + ptln('Sortorder for this node: '.$matches[1]); + ptln('
'); + } + return false; + } $iter = new DokuWikiIterator(); $iter->all(function(DokuWikiNode $node) {