No edit summary |
No edit summary Tag: 2017 source edit |
||
(8 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
The menu editor is used in various menus of the wiki ― for example in the [[Manual:Extension/BlueSpiceDiscovery/Main navigation|main navigation]] ― to set up navigation links. An edit link appears at the end of each menu when you hover over the menu. | The menu editor is used in various menus of the wiki ― for example in the [[Manual:Extension/BlueSpiceDiscovery/Main navigation|main navigation]] ― to set up navigation links. An edit link appears at the end of each menu when you hover over the menu. | ||
[[File:MenuEditor edit link.png|alt=menu items and activated edit link of the main navigation|center|thumb|201x201px|"Edit"-link of the menu editor]]Alternatively you can also open the MediaWiki page corresponding to the navigation or menu to edit | [[File:MenuEditor edit link.png|alt=menu items and activated edit link of the main navigation|center|thumb|201x201px|"Edit"-link of the menu editor]]Alternatively you can also open the MediaWiki page corresponding to the navigation or menu to edit. | ||
If the page doesn't yet exist, a corresponding note will appear and you can create the page.[[File:menuEditor menu does not exist.png|alt=Note for the initial creation of the sidebar page|center|thumb|650x650px|Seite ''MediaWiki:Sidebar'' anlegen.]] | If the page doesn't yet exist, a corresponding note will appear and you can create the page.[[File:menuEditor menu does not exist.png|alt=Note for the initial creation of the sidebar page|center|thumb|650x650px|Seite ''MediaWiki:Sidebar'' anlegen.]] | ||
Line 12: | Line 12: | ||
A new wiki already has some links created by default. These are displayed as system messages and reference pages with the same name in the MediaWiki namespace (to support the user languages). The entire menu or individual menu links can be deleted. | A new wiki already has some links created by default. These are displayed as system messages and reference pages with the same name in the MediaWiki namespace (to support the user languages). The entire menu or individual menu links can be deleted. | ||
[[File:MenuEditor getting started links.png|alt=View of the standard links system messages in edit mode|center|thumb|650x650px|The default links in the "Getting started" menu]] | [[File:MenuEditor getting started links.png|alt=View of the standard links system messages in edit mode|center|thumb|650x650px|The default links in the "Getting started" menu]] | ||
=== MediaWiki sidebar === | === MediaWiki sidebar === | ||
A simple list of links to wiki pages (often to portal pages) and is the standard view of the sidebar. | A simple list of links to wiki pages (often to portal pages) and is the standard view of the sidebar. A hierarchical navigation structure is not supported. If you need a more flexible menu, switch to the [[Manual:Extension/MenuEditor#Enhanced MediaWiki sidebar|Enhanced MediaWiki sidebar]]. | ||
If you have set "MediaWiki Sidebar" as the configuration, proceed as follows: | |||
'''To add a new heading''': | |||
= | # '''Click''' ''Add element''. [[File:Manual:Manual Extension MenuEditor 1750412382223.png|alt=Add menu heading|center|thumb|500x500px|Add menu heading]] | ||
# '''Enter''' the text for the heading. Note: In a multilingual wiki, enter a [[mediawikiwiki:Help:System_message|system message]] here. | |||
[[File:Manual:Manual Extension MenuEditor 1750412334804.png|alt=Text for menu heading|center|thumb|500x500px|Text for menu heading]] | |||
'''Add links:''' | |||
# '''Click''' on the hamburger menu next to the heading. | |||
# '''Select''' ''Add sub element''. [[File:Manual:Manual Extension MenuEditor 1750412543194.png|alt=Add link as sub element|center|thumb|500x500px|Add link as sub element]] | |||
# '''Enter''' the link target (page name) and the link designation (label). [[File:Manual:Manual Extension MenuEditor 1750412644530.png|alt=Create link|center|thumb|500x500px|Create link]] | |||
# '''Click''' on ''Done''. | |||
# '''Repeat''' steps 1-3. | |||
# '''Click''' ''Save''. | |||
=== Enhanced MediaWiki sidebar === | === Enhanced MediaWiki sidebar === | ||
This view shows a fully customizable multi-hierarchical menu. | This view shows a fully customizable multi-hierarchical menu. | ||
Here, you edit the page MediaWiki:Sidebar.json. It has the basic functionality of the [[Manual:Extension/ | Here, you edit the page MediaWiki:Sidebar.json. It has the basic functionality of the [[Manual:Extension/MenuEditor#MediaWiki sidebar|standard MediaWiki sidebar]]. In addition, it distinguishes between the following sub elements (=node types): | ||
* '''Internal Link''': Simply provide a link to a wiki page with an additional link label. Both the page name and/or label can be created by using a parser function. [[File:EnhancedMenuEditor-internal_link.png|alt=Internal link with a variable.|center|thumb|550x550px|Internal link with a variable.]] | |||
* '''External Link''': Same as internal link, but you need to provide a full url to an external website. | |||
* '''Subpage tree''': You can provide the name of a page that has one or more levels of subpages. You can set the depth <code>6</code> levels deep. This means, that if you want to show the first level of subpages, you would select a depth of <code>1</code>. | |||
[[File:EnhancedMenuEditor-subpage_tree.png|alt=Screenshot of the edit window for a subpage tree item.|center|thumb|550x550px|Creating a subpage tree with the Enhanced MenuEditor.]] | [[File:EnhancedMenuEditor-subpage_tree.png|alt=Screenshot of the edit window for a subpage tree item.|center|thumb|550x550px|Creating a subpage tree with the Enhanced MenuEditor.]] | ||
{{Textbox|boxtype=important|header=|text=You cannot use the same link label twice for different subpage trees, because the expand/collapse functionality will break.|icon=yes}} | {{Textbox|boxtype=important|header=|text=You cannot use the same link label twice for different subpage trees, because the expand/collapse functionality will break.|icon=yes}} | ||
It is not possible to change the node type (=item type) after creating it. Instead, create a new item as needed and delete the unwanted item. | It is not possible to change the node type (=item type) after creating it. Instead, create a new item as needed and delete the unwanted item. | ||
==== Show for groups ==== | |||
In addition, the visibility of a menu item can be limited to certain wiki groups. Enter a comma-separated list of existing wiki groups in the "Show for groups" field. | |||
==== Css classes ==== | |||
You can also apply css classes to any item for custom styling options. The styles need to be defined on the page <code>MediaWiki:Common.css.</code> | |||
== Edit other menus == | == Edit other menus == | ||
Line 74: | Line 75: | ||
** https://externallink.com|Label | ** https://externallink.com|Label | ||
</pre> | </pre> | ||
{{Box Links-en | |||
|Topic1=[[Manual:Menus_-_Overview|Menu overview]] | |||
|Topic2=|Topic3=}} | |||
{{translation}} | |||
Latest revision as of 09:58, 20 June 2025
Introduction
The menu editor is used in various menus of the wiki ― for example in the main navigation ― to set up navigation links. An edit link appears at the end of each menu when you hover over the menu.

Alternatively you can also open the MediaWiki page corresponding to the navigation or menu to edit. If the page doesn't yet exist, a corresponding note will appear and you can create the page.

If you have set the navigation type to MediaWiki Sidebar or Extended MediaWiki Sidebar on the main navigation , the navigation links are created using the menu editor.
Editing the default links
A new wiki already has some links created by default. These are displayed as system messages and reference pages with the same name in the MediaWiki namespace (to support the user languages). The entire menu or individual menu links can be deleted.

MediaWiki sidebar
A simple list of links to wiki pages (often to portal pages) and is the standard view of the sidebar. A hierarchical navigation structure is not supported. If you need a more flexible menu, switch to the Enhanced MediaWiki sidebar.
If you have set "MediaWiki Sidebar" as the configuration, proceed as follows:
To add a new heading:
- Click Add element.
Add menu heading - Enter the text for the heading. Note: In a multilingual wiki, enter a system message here.

Add links:
- Click on the hamburger menu next to the heading.
- Select Add sub element.
Add link as sub element - Enter the link target (page name) and the link designation (label).
Create link - Click on Done.
- Repeat steps 1-3.
- Click Save.
Enhanced MediaWiki sidebar
This view shows a fully customizable multi-hierarchical menu.
Here, you edit the page MediaWiki:Sidebar.json. It has the basic functionality of the standard MediaWiki sidebar. In addition, it distinguishes between the following sub elements (=node types):
- Internal Link: Simply provide a link to a wiki page with an additional link label. Both the page name and/or label can be created by using a parser function.
Internal link with a variable. - External Link: Same as internal link, but you need to provide a full url to an external website.
- Subpage tree: You can provide the name of a page that has one or more levels of subpages. You can set the depth
6
levels deep. This means, that if you want to show the first level of subpages, you would select a depth of1
.

It is not possible to change the node type (=item type) after creating it. Instead, create a new item as needed and delete the unwanted item.
Show for groups
In addition, the visibility of a menu item can be limited to certain wiki groups. Enter a comma-separated list of existing wiki groups in the "Show for groups" field.
Css classes
You can also apply css classes to any item for custom styling options. The styles need to be defined on the page MediaWiki:Common.css.
The following menus are also edited with the menu editor:
Visual editing mode
Click Edit to switch to edit mode.
To add a new menu heading:
- Click Add new element.
- Enter the text for your menu header. In a multilingual wiki, you can also enter a message key.
Source editing mode
Click Edit source to switch to source edit mode.
Entries starting with a single star ("*") create menu headings or sections while entries with two stars ("**") create links.
* Bookmarks ** Wiki_Page1|Label ** https://externallink.com|Label