Drawer Item
Last modified by Vincent Massol on 2023/01/23
Contents
Add an item in the the Drawer menu
Usage
The extension point adds the content inside the drawer menu.
XWiki <8.4.3
The items were displayed directly in the drawer, after the languages menu, without any distinction between local and global.
Definition
This Extension Point is contributed by this extension and was added in version 7.3-milestone-1 of that extension.
- Category
- Drawer
- Extension Id
- org.xwiki.plaftorm.drawer
- Content to be provided
The code to add in the extension point.
It should look like this:
{{velocity}}{{html clean="false"}} ## we need clean="false" because we want to display the raw content of #drawerItem()
#template('drawer_macros.vm')
#drawerItem('someURL', 'someIcon', 'some xml-escaped text', 'some HTML id')
{{/html}}{{/velocity}}To add a submenu (like the languages menu):
{{velocity}}{{html clean="false"}} ## we need clean="false" because we want to display the raw content of #drawerItem()
#template('drawer_macros.vm')
#drawerTopItemStart('some icon', 'some xml-escaped title' , 'some HTML id')
#drawerItem('someURL', 'someIcon', 'some xml-escaped text', 'some HTML id')
#drawerItem('someURL', 'someIcon', 'some xml-escaped text', 'some HTML id')
#drawerItem('someURL', 'someIcon', 'some xml-escaped text', 'some HTML id')
#drawerTopItemStop()
{{/html}}{{/velocity}}- Parameters to be provided
- order: the order in which the item will be displayed. The lower the number is, the more on the top the item is. Examples of correct orders: 10000, 20000. Please let enough room to add other UIX between existing ones and your own. The current items have these orders:
Local category:
Administer Wiki 10000 Home Wiki (link available on subwikis) 20000 Wiki Index 30000 Document Index 40000 User Index 50000 Application Index 55000 Create Wiki 60000 Delete Wiki (link available on subwikis) 70000 Global category:
Wiki Index 10000 - separator: true if a separator should be displayed before the item. (optional)
- category: local or global according to the place where the item should be located. local is assumed by default. (optional) Could be
- order: the order in which the item will be displayed. The lower the number is, the more on the top the item is. Examples of correct orders: 10000, 20000. Please let enough room to add other UIX between existing ones and your own. The current items have these orders: