AnsweredAssumed Answered

Hide Item Menu

Question asked by redzed on Mar 29, 2017
Hello,   I work on Alfresco 5, I created a data model, I have two new types:
   <type name = "my: folder_A">
     <parent> cm: folder </ parent>
...
<type name = "my: folder_B">
      <parent> cm: folder </ parent>
...   
And I used this tutorial:

 

Adding a menu item to the "Create..." menu in DocLib | Alfresco Documentation 



I have two buttons:
 - Create Folder A
 - Create Folder B

I don't want the two menu items to appear all the time :
- I would like to see "Create Folder A" only when I am in a folder.
- I would like to see "Create Folder B" only when I am in a "Folder A"

* How can I do this ?

If I create an "add-create-menuitem-doclib-context.xml" with the content:

    <Bean id = "alfresco.evaluator.folderA" parent = "evaluator.doclib.action.nodeType">
        <Property name = "types">
            <List>
                <Value> my:folder_A </ value>
            </ List>
        </ Property>
    </ Bean>

I guess this evaluator returns true if I am at a node of type my:folder_A? Does this work for me?
Or if you have an alternative.

thank you

Outcomes