Hide Context Menu Options in Data Object Tree (Pimcore Studio) #2533
Replies: 4 comments 6 replies
-
|
I seen DataObjectTreeContextMenuProps inside core/modules/data-object/tree/context-menu but didn't get SDK so please suggest how to call DataObjectTreeContextMenu |
Beta Was this translation helpful? Give feedback.
-
|
Hi @harshida-patel, Please check this docs page to see how to work with the context menu registry: https://docs.pimcore.com/platform/Studio_UI/SDK_Overview/Context_Menu_Registry/ In the latest nightly/canary build I also added the possibility to modify existing items (until then it would be only possible be overriding the Check the updated docs for the next release: I also added a working example to our studio-example-bundle: Best, |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
Hi @markus-moser I tested this functionality and it works when hiding the menu statically. However, when I try to apply conditions fetched from an API, it fails. The issue seems to be related to handling both sync and async operations—because the menu is generated before the API response arrives, the preload menu logic doesn’t work as expected. For example this is working but for check condition based on object status through API its not working |
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In the Classic Admin interface, we can hide specific context menu options in the Data Object Tree using the following event:
We need to implement the same functionality in Pimcore Studio to hide certain context menu options in the Data Object Tree (e.g., “Save”, “Publish”, “Unpublish”, etc.).
I attempted the following approach using the Studio SDK:
However, this approach didn’t work as expected.
Please suggest which SDK or event should be used in Pimcore Studio to achieve this functionality.
Beta Was this translation helpful? Give feedback.
All reactions