In the oracle forums today a question came up about how to add custom actions to the menus in the actions drop downs for the Content Information page (sometimes called the Doc Info page). I wanted to dive into this a little more because in 10gR3 the way the developers crafted the menus is much more extensible. It is very nice. Somebody should get a raise.
Look at the dynamic html include named docinfo_menus_setup in the std_page.htm file. The menus are crafted as a result set, which makes adding to the menus very easy. Also, at the end of the code they perform an include on something named custom_docinfo_menus_setup and this is key. Let's look at how we might override this include to add some of our own custom actions:
The collection of menus on the page are known as PageMenusData. Technically there are three menus within this. The bar going across the page (HEADER_MENU) is the first menu, and the second two menus (CONTENT_ACTIONS & EMAIL) hang off of that bar.
As you look through the docinfo_menus_setup include you see these menu names or id's in action and you can start to piece together how the menu structure is crafted. Our custom actions have been "joined" to the CONTENT_ACTIONS menu by setting that menu id as the parent id for our menu nodes.
Load order is also one of the more interesting points. Supplying specifically planned load orders allows you to control where in the menu your node is displayed. And SOMEBODY at Oracle/Stellent was paying attention because the load order for the default set of actions items generally increments by units of ten. This means they left some space in there for us to get our custom actions in between out of the box actions if we find the need.
Here is an example component you can download and adjust to play around with this functionality.