Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-10881

Support Custom Folder Context Menu Item in Binaries Folder

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 5.0.0
    • Fix Version/s: 5.3.0
    • Component/s: None
    • Labels:
      None
    • Similar issues:
    • Story Points:
      1
    • Processed by team:
      Tiger
    • Sprint:
      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

        1. add_dummy_contextmenu.png
          add_dummy_contextmenu.png
          523 kB
        2. default_no_dummy.png
          default_no_dummy.png
          108 kB
        3. new_dummy_contextmenu.png
          new_dummy_contextmenu.png
          127 kB
        4. save_dummy_contextmenu.png
          save_dummy_contextmenu.png
          411 kB

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                wko Woonsan Ko
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: