Drawer Item

Version 28.1 by Guillaume Delhumeau on 2016/12/07

Add an item in the Drawer menu

Usage

The extension point adds the content inside the drawer menu, after the languages selection.

drawer-local.png

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

Before 8.4.3, the items were displayed directly in the drawer, 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.3M1 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:
    Administer Wiki10000
    Home Wiki (link available on subwikis)20000Removed since 8.4.3
    Wiki Index30000Moved in DrawerGlobalItem 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
  • separator: Since 7.3M2 (optional) true if a separator should be displayed before the item.
Tags:
   

Get Connected