Update `codebox` macro
[GitHub/WoltLab/woltlab.github.io.git] / docs / package / pip / user-menu.md
1 # User Menu Package Installation Plugin
2
3 Registers new user menu items.
4
5 ## Components
6
7 Each item is described as an `<usermenuitem>` element with the mandatory attribute `name`.
8
9 ### `<parent>`
10
11 <span class="label label-info">Optional</span>
12
13 The item’s parent item.
14
15 ### `<showorder>`
16
17 <span class="label label-info">Optional</span>
18
19 Specifies the order of this item within the parent item.
20
21 ### `<controller>`
22
23 The fully qualified class name of the target controller.
24 If not specified this item serves as a category.
25
26 ### `<link>`
27
28 Additional components if `<controller>` is set,
29 the full external link otherwise.
30
31 ### `<iconclassname>`
32
33 !!! info "Use an icon only for top-level items."
34
35 Name of the Font Awesome icon class.
36
37 ### `<options>`
38
39 <span class="label label-info">Optional</span>
40
41 The options element can contain a comma-separated list of options of which at least one needs to be enabled for the menu item to be shown.
42
43 ### `<permissions>`
44
45 <span class="label label-info">Optional</span>
46
47 The permissions element can contain a comma-separated list of permissions of which the active user needs to have at least one for the menu item to be shown.
48
49 ### `<classname>`
50
51 The name of the class providing the user menu item’s behaviour,
52 the class has to implement the `wcf\system\menu\user\IUserMenuItemProvider` interface.
53
54
55
56 ## Example
57
58 {jinja{ codebox(
59 title="userMenu.xml",
60 language="xml",
61 filepath="package/pip/userMenu.xml"
62 ) }}