How to add condtional action buttons for folder_contents


I am trying to add a button to the folder_contents view of a custom folder Type. The button allows users to categorize certain items in the folder quickly. I based the code on the following examples:

  • plone/
  • plone/
    (i was not allowed to add links...)

My custom configure.zcml entry:

  <utility component=".category.CategoryAction"
         name="category" />

And while the functionality works, the button now appears on all folder_content views. I presume because this is a global utility.

I only want to show the extra button on the folder_contents of my custom StaffFolders Type however. I was thinking I should maybe use a local Utility? If so, how should I do this? ( the links on Utilities — Plone Documentation v5.2 seem to be broken)

Or is there a better method to achieve this.

Thanks in advance.

Plone Foundation Code of Conduct