Added a exclusion mask.
This is a regexp to ignore certain pages.
This commit is contained in:
parent
fb1ed3d78e
commit
2caff335fb
1 changed files with 4 additions and 1 deletions
|
@ -26,6 +26,9 @@ class syntax_plugin_navigation extends DokuWiki_Syntax_Plugin
|
||||||
private $maxDepth = 3;
|
private $maxDepth = 3;
|
||||||
private $depth = 0;
|
private $depth = 0;
|
||||||
|
|
||||||
|
/** @var string A regexp to configure which pages to exclude */
|
||||||
|
private $exclusion_mask = '/sidebar/';
|
||||||
|
|
||||||
function getInfo()
|
function getInfo()
|
||||||
{
|
{
|
||||||
return array('author' => 'Tim Schumacher',
|
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());
|
$title = (strlen($node->getMetaData('title')) > 0 ? $node->getMetaData('title') : $node->getName());
|
||||||
$access = auth_quickaclcheck($node->getFullID());
|
$access = auth_quickaclcheck($node->getFullID());
|
||||||
if ($node instanceof DokuWikiPage) {
|
if ($node instanceof DokuWikiPage) {
|
||||||
if ($access > 0) {
|
if (($access > 0) && (!preg_match($this->exclusion_mask,$node->getFullID()))) {
|
||||||
$output .= '<li><a href="' . wl($node->getFullID()) . '">' . $title . '</a></li>' . PHP_EOL;
|
$output .= '<li><a href="' . wl($node->getFullID()) . '">' . $title . '</a></li>' . PHP_EOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue