Enrichment Service Context Menu Entries
In some cases you may want users to be able to send a content item
to an enrichment service by selecting a menu entry. You can achieve
this by adding menu entries to content item context menus. A context
menu can be displayed by right clicking on the content cards
displayed in search results and other lists of content item, or by
clicking on the "hamburger" button displayed in the top right corner
of a content editor. To add an enrichment service to the context
menus, you need to add a configuration like this to
/etc/escenic/cue-web-2.9/config.yml
,
as well as the main enrichment service configuration:
extendedContextMenuItems: - name: "print-service" title: "Print" trigger: "on-print-menu-item-click" publication: "tomorrow-online" mimeTypes: ["x-ece/story"]
The extendedContextMenuItems
property can contain
any number of children, each defining a menu entry for a different
enrichment service. Each menu entry definition should consist of the
following properties:
name
-
A name for the menu entry definition.
title
-
The label to appear on the menu entry.
trigger
-
A trigger name for the menu item. The name you specify here must also appear in the enrichment service's list of triggers. For example:
- name: print-article href: http://host:port/printArticle title: Print Article triggers: - name: on-click - name: on-print-menu-item-click
publication
-
The publication with which the menu entry is to be associated. The menu entry will only appear in the context menu of content items that belong to the specified publication. This property is optional: if you omit it then the menu entry will appear in the context menu of content items belonging to any publication.
mimeTypes
-
The MIME types with which the menu entry is to be associated. The menu entry will only appear in the context menu of content items of the specified types. This property is optional: if you omit it then the menu entry will appear in the context menu of content items of all types.