This is an old revision of the document!
Table of Contents
MenuExt Plugin
Compatible with DokuWiki
- 2024-02-06 "Kaos" unknown
- 2023-04-04 "Jack Jackrum" unknown
- 2022-07-31 "Igor" unknown
- 2020-07-29 "Hogfather" yes
This plugin allows Wiki administrators to add arbitrary links into DokuWiki's Menus by editing a simple configuration file.
Installation
Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.
Configuration
To make use of the plugin, you need to create a conf/menuext.json
file. Here's the example that comes with the plugin:
- conf/menuext.json
{ "page": [ { "order": 3, "label": { "en": "Google Search", "de": "Google Suche" }, "title": { "en": "Execute a Google search on the current page ID", "de": "Führe eine Google Suche mit der aktuellen Seiten-ID aus" }, "link": "https://www.google.com/search?q=@ID@", "svg": "google.svg", "attr": { "target": "_blank" } }, { "action": "login" } ] }
As you can see, it's a nested structure configuring the menu items. The top level defines the menu to add to (see Available Menus) For each you can define the items to add.
order | Position to add this item (starts at 0). Defaults to to add at the end. Use negative numbers to count from the end |
label | The label to show on the menu item. One entry per language. |
title | The title to show on mouseover. One entry per language. |
link | The link to use when clicking the item, can contain Replacement Patterns |
svg | The SVG icon to use. Can be a media ID, an absolute file name or a icon from materialdesignicons.com (auto downloaded from the latter) |
attr | additional attributes to set on the A node in HTML |
Alternatively to creating custom items, you can also reuse existing items by specifying the action
parameter. Above example adds the login/logout button to the page menu.
order | Position to add this item (starts at 0). Defaults to to add at the end. Use negative numbers to count from the end |
action | A standard action (see action_modes). Please note that not all actions do have corresponding MenuItems available |