diff --git a/Menuitem.php b/Menuitem.php index 744a16d..1608e1b 100644 --- a/Menuitem.php +++ b/Menuitem.php @@ -14,6 +14,7 @@ class MenuItem extends AbstractItem { + /** * The first compile time, the javascript may not * work, we send the user to the admin page @@ -36,6 +37,7 @@ public function getLinkAttributes($classprefix = 'menuitem ') { $linkAttributes = parent::getLinkAttributes($classprefix); + $linkAttributes['id'] = self::MENU_HTML_ELEMENT_ID; return $linkAttributes; @@ -47,6 +49,8 @@ public function getType() } + + public function getTitle() { $stale = plugin_load('helper', helper_plugin_stale::PLUGIN_NAME); diff --git a/action.php b/action.php index 696409f..0d73560 100644 --- a/action.php +++ b/action.php @@ -68,7 +68,7 @@ public function add_menu_item(Doku_Event $event, $param) * https://www.dokuwiki.org/devel:menus * If this is not the page menu, return */ - if ($event->data['view'] != 'page') return; + if ($event->data['view'] != 'site') return; /** @var helper_plugin_stale $stale */ $stale = plugin_load('helper', 'stale');