From 2caff335fbdc4104f74306666e640c09e8baac82 Mon Sep 17 00:00:00 2001 From: Tim Schumacher Date: Sat, 25 Jan 2014 09:32:43 +0100 Subject: [PATCH] Added a exclusion mask. This is a regexp to ignore certain pages. --- syntax.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/syntax.php b/syntax.php index 9554bc1..ba4b703 100644 --- a/syntax.php +++ b/syntax.php @@ -26,6 +26,9 @@ class syntax_plugin_navigation extends DokuWiki_Syntax_Plugin private $maxDepth = 3; private $depth = 0; + /** @var string A regexp to configure which pages to exclude */ + private $exclusion_mask = '/sidebar/'; + function getInfo() { return array('author' => 'Tim Schumacher', @@ -119,7 +122,7 @@ class syntax_plugin_navigation extends DokuWiki_Syntax_Plugin $title = (strlen($node->getMetaData('title')) > 0 ? $node->getMetaData('title') : $node->getName()); $access = auth_quickaclcheck($node->getFullID()); if ($node instanceof DokuWikiPage) { - if ($access > 0) { + if (($access > 0) && (!preg_match($this->exclusion_mask,$node->getFullID()))) { $output .= '
  • ' . $title . '
  • ' . PHP_EOL; }