Enable/Disable Share create content menu option

Showing results for 
Search instead for 
Did you mean: 
Member II

Enable/Disable Share create content menu option


ReSmiley Frustratedhare-custom-config.xml

I'm trying to find a way to dynamically enable/disable a "create content" menu option in the Share repository task bar. Hopefully I can create a user group that can allow use of this command, if the user isn't part of the group then the option is not displayed.

This is a custom content type that has already been defined & is in use successfully so everything is already in place, all I need is some way to disable it if required.

I assumed that using an evaluator in the same way as with actions would suffice but they don't seem to be triggered for the menu items.

<config evaluator="string-compare" condition="DocumentLibrary">
      <content id="plain-text" mimetype="text/plain" label="some text" itemid="model:customtype" icon="icon">
      <type name="cm:content">
         <subtype name="model:customtype" />
      <type name="cm:folder">

Any pointers would be appreciated.

1 Reply

Re: Enable/Disable Share create content menu option

You could simply override the create-content group as empty in the default share-config-custom.xml and then have a Surf Extension module add in the elements that you want. A Surf extension module can be configured with an evaluator based on group membership of the current user, and that way you can group all create-content items under one evaluator. I do not believe that the create-content elements themselves even support the evaluator element, since they are never dynamically processed like e.g. metadata templates and actions are.