Adds an item in the "Content" menu

Usage

The extension point adds the content inside the "Content" menu.

The order is controlled with the order UIX parameter. The element order increment is 10000 (i.e. "edit" is 10000, "add" is 20000, etc.).

contentmenu.png

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

Definition

This Extension Point is contributed by this extension and was added in version 9.3-rc-1 of that extension.

Category
Content menus
Extension Id
org.xwiki.plaftorm.menu.content
Content to be provided

The code to add in the extension point.

Examples:

  • To add a simple button:

    contentmenu-custom-button.png

    {{html}}
    <div class="dropdown" id="myButton">
      <a href="http://xwiki.org" role="button" title="My Button"><span class="glyphicon glyphicon-cloud"></span></a>
    </div>
    {{/html}}
  • To add a dropdown menu:

    contentmenu-custom-submenu.png

    {{velocity}}
    {{html clean='false'}}
    #template('menus_macros.vm')
    <div class="dropdown" id="myMenu">
      <a href="" data-toggle="dropdown" role="button" title="My Menu"><span class="glyphicon glyphicon-heart"></span></a>
      <ul class="dropdown-menu">
        #submenuitem('http://xwiki.org', 'My', 'myMenuMy', 'class', 'globe')
        #submenuitem('http://xwiki.org', 'Menu', 'myMenuMenu', 'class', 'flag')
        #submenuitem('url', 'title', 'id', 'class', 'icon')
      </ul>
    </div>
    {{/html}}
    {{/velocity}}
Parameters to be provided
  • order: the order in which the item will be displayed. The lower the number is, the more to the left 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 (even if most of them are not really implemented as UI extensions) have these orders:
    Edit10000
    Create20000
    More Actions40000
Tags:
Created by Vincent Massol on 2017/09/09
   

Get Connected