MidCOM Toolbars

flack edited this page Dec 8, 2016 · 9 revisions

This service provides an interface for working with toolbars. To render them, the following code should be included into one of the theme's Style Elements:



There are different options for displaying toolbars. The standard is to have a centralized, floating toolbar which combines all options available to the current user in the given path. You can also split this into HTML-only toolbars.

The centralized toolbar is divided into four submenus, Page, Folder, Website and Help. Page holds options for the current content object (like access to the RCS, ACL and Metadata systems, to content approval as well as edit and delete links). Folder holds options for the current Topic (controlled by midcom.admin.folder), while Website contains global options (like Logout and Cache Invalidation)

Usage in Components

Components can include custom commands into the menus. In handlers, both the view and the topic toolbar are available through inherited properties:

public function _handler_index($handler_id, array $args, array &$data)

Apart from this, midcom_helper_toolbar can also be used independently to create and render new toolbars:

$toolbar = new midcom_helper_toolbar;
echo $toolbar->render();