Drawer Item

Last modified by Vincent Massol on 2023/01/23

Add an item in the the Drawer menu

Usage

The extension point adds the content inside the drawer menu.

drawer-local.png drawer-global.png

You must have the "admin" right on the wiki to be able to create an UI extension.

XWiki <8.4.3 

The items were displayed directly in the drawer, after the languages menu, without any distinction between local and global.

drawer.png drawer-with-languages.png

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 Wiki10000 
    Home Wiki (link available on subwikis)20000Removed since 8.4.3
    Wiki Index30000Moved in the global scope since 8.4.3
    Document Index40000
    User Index50000
    Application Index55000
    Create Wiki60000Removed since 8.4.3
    Delete Wiki (link available on subwikis)70000Removed since 8.4.3

    Global category:

    Wiki Index10000
  • separator: Since 7.3M2 (optional) true if a separator should be displayed before the item.
  • category: Since 8.4.3 (optional) Could be local or global according to the place where the item should be located. local is assumed by default.
Tags:
   

Get Connected