Adding context menu items in the explorer
Adding a new context menu item to the resource's context menu in the explorer is fairly easy since OpenCms 10.
The new context menu items added by the example
The example generates a new main menu item "Greet" with a subitem "Say Hello". Clicking on the sub-item you get an alert message, saying hello.
The visibility of the menu items is as follows:
- For folders the item does not show up
- For multiple resources, the item shows up, but is deactivated
- For a single non-folder resource the item shows up and is active
This is illustrated by the following figures.