Fork me on GitHub

Developer's How-to (Flat List View)

Configuring Custom Folder Context Menu Items

You should add a custom folder context menu item configuration like the example (in System View XML format) shown below, under each of the following configuration nodes:

  • /hippo:configuration/hippo:workflows/threepane/folder/frontend:renderer
  • /hippo:configuration/hippo:workflows/threepane/folder-extended/frontend:renderer
  • /hippo:configuration/hippo:workflows/threepane/folder-permissions/frontend:renderer

This is an example with ExampleExternalDocumentServiceFacade having embedded external XML data in a classpath resource:

<?xml version="1.0" encoding="UTF-8"?>
<sv:node sv:name="exdocDocs" xmlns:sv="">
  <sv:property sv:name="jcr:primaryType" sv:type="Name">
  <sv:property sv:name="plugin.class" sv:type="String">
  <sv:property sv:name="" sv:type="String">
  <sv:property sv:name="" sv:type="String">
  <sv:property sv:name="" sv:type="String">
    <sv:value>Add External Documents ...</sv:value>
  <sv:property sv:name="external.document.service.facade" sv:type="String">
  <sv:property sv:name="" sv:type="String">

Implementing your ExternalDocumentServiceFacade class

See an example ExternalDocumentServiceFacade implementation code here:

Put your own implementation class in your CMS module project.

See Javadocs for detail about the ExternalSearchServiceFacade.

Plugin Parameters

You may configure the following plugin parameters in the folder workflow's frontend:renderer configuration node. e.g, /hippo:configuration/hippo:workflows/threepane/folder/frontend:renderer.

Parameter name Description Example value(s) Default value(s) Icon image name for the custom folder context menu item. The icon image will be looked up from the classpath:org/onehippo/forge/exdocpicker/impl/folder/. So, if this parameter is set to "folder-configure.png", then you should put the image file into the corresponding path in your CMS authoring web application. e.g, cms/src/main/resources/org/onehippo/forge/exdocpicker/impl/folder/folder-configure.png "Add External Documents ..." Lable for the custom folder context menu item. "Add External Documents ..."
external.document.service.facade org.onehippo.forge.exdocpicker.api.ExternalDocumentServiceFacade implementation class FQN. "org.onehippo.forge.exdocpicker.demo.field.ExampleExternalDocumentServiceFacade"
selection.mode External document selection mode. Either 'single' or 'multiple'. If this is 'single', then users can select only one external document item in the UI. Otherwise, users can select multiple external document items. "single" or
dialog.size The size of the picker popup dialog. "width=600,height=400" "width=835,height=650" Flag whether the popup dialog box will search external documents initially when opening up. true false Search query string or search term when the initial search is made in the dialog box when opening up if is set to true.

Note: it's up to the ExternalDocumentServiceFacade implementation to determine how to deal with the search query argument.
"*" ""
page.size The page size (item count per page) in the popup dialog. 10 5

Plugin Specific Parameters of ExampleExternalDocumentServiceFacade

The following parameters are set for the ExampleExternalDocumentServiceFacade implementation additionally.

Parameter name Description Example value(s) Default value(s) The physical node property name to read from or store to when selection an external document. exdocpickerbasedemo:relatedexdocids