WoodWing Help Center

Elvis 4 action plug-ins - development

Elvis 4 action plug-ins - development

Action plugins allow you to extend functionality in the desktop client by allowing the client to open HTML pages in tabs, dialogs or an external web browser while retaining certain context specific information. These plugins can be used by clicking custom buttons and menu's that are added to the interface.

The plugin page can be a static HTML page hosted inside the Elvis plugins folder, but it can also be a PHP, ASP, JSP or other page hosted on a different server.

This section contains a couple tips and tricks to get you started.

Bundled plugins and code samples

The easiest way of getting insight in how plugins work, is to review some of the bundled action plugins. There are developer code samples and ready to use plugins available:

  • Developer plugin samples: <Config>/plugins/samples/code_samples/action_plugins
  • Bundled action plugins: <Config>/plugins/samples/action_plugins

You can see how they work and how they are configured. They are open source, so feel free to use them as the starting point of your own plugin.

There are quite a few simple and easy to understand samples like hello_world and search_in_getty showing the basic possibilities of plugins. There are also technically more advanced samples like print_contact_sheet and search_other_elvis.

Configuration

The action plugin configuration determines the characteristics of your plugin, make sure you read through Action plug-in - configuration before you start developing.

Client context information

Context information like the currently selected assets or folders and information about the logged in user, is passed to the plugin page via the elvisContext. The context is a vital part of almost any action plugin, allowing your code to act on the current state of the desktop client.

Elvis API

The context information on selected assets and folders is limited. So plugins are often developed in conjunction with the Elvis API to retrieve extra information such as metadata, original files, previews, etc.

A lot of user interface components are available through the JavaScript libraries, like showing a list of thumbnails, asset previews, facets and many more. Using them makes it really easy to quickly build a plugin UI.

Test & debug environment

We advise you to use an external web browser for plugin development & testing, this allows you to use the browser's debugging tools to debug HTML, CSS and JavaScript. Test the plugin in the client after the development process is completed.

One common issue when developing plugins that reference html, css or js files from your plugin folder is that the Elvis desktop client or web browsers tend to 'cache' your css and js files. To ease development, add the following to your Elvis server config:

preventBrowserCacheForServedFilesOfType=html, htm, css, js

Also check out the debug plugin, this is a great tool during plugin development.

the Elvis Debug Plug-in

Was this article helpful?
0 out of 0 found this helpful / Created: / Updated:
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.