diff --git a/action.php b/action.php index ee45cbc..2d54d5b 100644 --- a/action.php +++ b/action.php @@ -27,6 +27,7 @@ class action_plugin_childrenpages extends DokuWiki_Action_Plugin { * @param Doku_Event $event */ public function addMenuItem(Doku_Event $event) : void { + global $INFO; // Check that this method has been called in the expected context if ( $event->name !== 'MENU_ITEMS_ASSEMBLY' ) { $message = "Tabpage plugin error:"; @@ -38,6 +39,10 @@ class action_plugin_childrenpages extends DokuWiki_Action_Plugin { if ( $event->data['view'] !== 'page' ) { return; } + // Only add links if the current page is not included in a namespace + if ( ! empty($INFO['namespace']) ) { + return; + } trigger_error('addMenuItem() not implemented in '.get_class($this), E_USER_WARNING); } }