Add a status indicator for the sortorder.

This commit is contained in:
Tim Schumacher 2013-12-10 21:24:09 +01:00
parent ea20baa3ab
commit 809799f84c

View file

@ -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('<div class="info">');
ptln('Sortorder for this node: '.$matches[1]);
ptln('</div>');
}
return false;
}
$iter = new DokuWikiIterator();
$iter->all(function(DokuWikiNode $node) {