Add content to package_pip_user-profile-menu
authorTim Düsterhus <tim@bastelstu.be>
Wed, 28 Mar 2018 15:28:58 +0000 (17:28 +0200)
committerTim Düsterhus <tim@bastelstu.be>
Wed, 28 Mar 2018 15:28:58 +0000 (17:28 +0200)
pages/package/pip/package_pip_template-listener.md
pages/package/pip/package_pip_user-profile-menu.md

index 06edb8e58d6493f9376fb9f9e978f205c846a02e..35f625589bdd3d97c54fe47db118e3e2a583ca14 100644 (file)
@@ -39,6 +39,8 @@ The value determines if the template listener will be executed in the frontend (
 
 ### `<niceValue>`
 
+{% include callout.html content="Optional" type="info" %}
+
 The nice value element can contain an integer value out of the interval `[-128,127]` with `0` being the default value if the element is omitted.
 The nice value determines the execution order of template listeners.
 Template listeners with smaller nice values are executed first.
@@ -48,10 +50,14 @@ If the nice value of two template listeners is equal, the order is undefined.
 
 ### `<options>`
 
+{% include callout.html content="Optional" type="info" %}
+
 The options element can contain a comma-separated list of options of which at least one needs to be enabled for the template listener to be executed.
 
 ### `<permissions>`
 
+{% include callout.html content="Optional" type="info" %}
+
 The permissions element can contain a comma-separated list of permissions of which the active user needs to have at least one for the template listener to be executed.
 
 
index 6cb14e9820c3db7756b761ea62bb8c574f409fdf..0f1626cf7550e6734fce90ece8b1d509d11a2f3d 100644 (file)
@@ -6,4 +6,46 @@ folder: package/pip
 parent: package_pip
 ---
 
-*Content will follow soon*
+Registers new user profile tabs.
+
+## Components
+
+Each category is described as an `<userprofilemenuitem>` element with the mandatory attribute `name`.
+
+### `<classname>`
+
+The name of the class providing the tab’s behaviour,
+the class has to implement the `wcf\system\menu\user\profile\content\IUserProfileMenuContent` interface.
+
+### `<showorder>`
+
+{% include callout.html content="Optional" type="info" %}
+
+Determines at which position of the tab list the tab is shown.
+
+### `<options>`
+
+{% include callout.html content="Optional" type="info" %}
+
+The options element can contain a comma-separated list of options of which at least one needs to be enabled for the tab to be shown.
+
+### `<permissions>`
+
+{% include callout.html content="Optional" type="info" %}
+
+The permissions element can contain a comma-separated list of permissions of which the active user needs to have at least one for the tab to be shown.
+
+## Example
+
+```xml
+<?xml version="1.0" encoding="utf-8"?>
+<data xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com http://www.woltlab.com/XSD/vortex/userProfileMenu.xsd">
+       <import>
+               <userprofilemenuitem name="example">
+                       <classname>wcf\system\menu\user\profile\content\ExampleProfileMenuContent</classname>
+                       <showorder>3</showorder>
+                       <options>module_example</options>
+               </userprofilemenuitem>
+       </import>
+</data>
+```