Details
-
Improvement
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
5.0.0
-
None
-
None
-
1
-
Tiger
-
Tiger Sprint 179, Tiger Sprint 180
Description
The documentation [1] explains how to add a custom extra folder context menu item in a document folder by adding a custom workflow class and configuring it in three threepane workflow configurations under the following:
- /hippo:configuration/hippo:workflows/threepane/folder-permissions/frontend:renderer
- /hippo:configuration/hippo:workflows/threepane/folder-extended/frontend:renderer
- /hippo:configuration/hippo:workflows/threepane/folder/frontend:renderer
However, unfortunately, it has not been known that it is also possible to support this custom context menu even in gallery or asset folder.
Here's how to support the similar custom folder context menus even in gallery/asset folders:
- By default, /hippo:configuration/hippo:workflows/threepane/image-gallery/frontend:renderer is configured like the following:
<?xml version="1.0" encoding="UTF-8"?> <sv:node sv:name="frontend:renderer" xmlns:sv="http://www.jcp.org/jcr/sv/1.0"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> <sv:value>frontend:plugin</sv:value> </sv:property> <sv:property sv:name="browser.id" sv:type="String"> <sv:value>${browser.id}</sv:value> </sv:property> <sv:property sv:name="editor.id" sv:type="String"> <sv:value>${editor.id}</sv:value> </sv:property> <sv:property sv:name="plugin.class" sv:type="String"> <sv:value>org.hippoecm.frontend.plugins.standardworkflow.FolderWorkflowPlugin</sv:value> </sv:property> </sv:node>
- If you replace the node with the following, it still works without any difference:
<?xml version="1.0" encoding="UTF-8"?> <sv:node sv:name="frontend:renderer" xmlns:sv="http://www.jcp.org/jcr/sv/1.0"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> <sv:value>frontend:plugincluster</sv:value> </sv:property> <sv:property sv:multiple="true" sv:name="frontend:references" sv:type="String"> <sv:value>browser.id</sv:value> <sv:value>editor.id</sv:value> <sv:value>wicket.model</sv:value> </sv:property> <sv:property sv:multiple="true" sv:name="frontend:services" sv:type="String"> <sv:value>wicket.id</sv:value> </sv:property> <sv:property sv:name="item" sv:type="String"> <sv:value>${cluster.id}.item</sv:value> </sv:property> <sv:node sv:name="root"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> <sv:value>frontend:plugin</sv:value> </sv:property> <sv:property sv:name="plugin.class" sv:type="String"> <sv:value>org.hippoecm.frontend.service.render.ListViewPlugin</sv:value> </sv:property> </sv:node> <sv:node sv:name="standard"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> <sv:value>frontend:plugin</sv:value> </sv:property> <sv:property sv:name="plugin.class" sv:type="String"> <sv:value>org.hippoecm.frontend.plugins.standardworkflow.FolderWorkflowPlugin</sv:value> </sv:property> <sv:property sv:name="wicket.id" sv:type="String"> <sv:value>${item}</sv:value> </sv:property> </sv:node> </sv:node>
- However, the second one is a lot better because it allows to add any custom extra folder context menu item as instructed in [1] in the same way how you do in a document folder.
- The second one defines a frontend:plugincluster with root plugin (ListViewPlugin) to include every sibling plugin configurations instead of directly creating a frontend:plugin like the first one does. This is how the document folder context menu could be customized.
Therefore, I would be nice to replace the existing one (first one) with the new one (second one) by default.
[1] https://www.onehippo.org/library/concepts/plugins/menu-plugin.html
Attachments
Issue Links
- includes
-
HSTTWO-4119 Add simple demo for a Custom Folder Context Menu Item example in Binaries Folder
- Closed