Start page
Start page

Start page / Plug-In Development / ContentCreator Extensions / Interactive Features / Toolbar Menu Items / Functional Overview

Toolbar Menu Items: Functional Overview

Toolbar menu entries

Menu items representing plug-in actions in the menu "Actions"

The toolbar menu "Actions" can include both plug-in actions as well as scripts and make these available to users.

When one item is selected from the menu, the associated Java action or Beanshell script is executed within the context of the currently displayed page reference.

Functionality

Custom menu actions are inserted into the toolbar menu "Actions".

  • Beanshell scripts that exist in the Template Store folder "Scripts" and are configured with the script type "Menu" will be displayed in the group "Scripts"
  • Menu actions installed via FirstSpirit Modules will be displayed in the group "Plug-ins"
  • Additionally, workflows (defined in the Template Store folder "Workflows") that can operate outside of a web page context are displayed in this menu, grouped under the header "Workflows"

When a menu item is selected, the Beanshell script or operational method of the corresponding Java class is called. This action will then work within the context of the page reference currently displayed in the preview pane.

Example Implementation

The ContentCreator Examples module source code includes one implementation of a toolbar menu item plug-in:

  • PageInfoToolbarActionsItemsPlugin
    provides a menu item in the "Actions" toolbar menu that is always visible:
    • The menu item "Direct link address to this page" uses JavaScript to display a message box with a URL that may be selected and copied. This link provides a deep link towards the current preview page and will enable another browser instance to load this page inside ContentCreator's interface directly, including a redirect to the authentication page if necessary.

This example is located in the module's package de.espirit.firstspirit.opt.example.webedit.toolbar.

Code Example

The Toolbar Menu Item Code Example introduces and documents the implementation workflow and points out general considerations in designing menu item plug-ins.

© 2005 - 2015 e-Spirit AG | All rights reserved. | Last change: 2013-12-09