Adding a separator or submenu to a context menu
Add a separator or a submenu to a context menu to set a group of related controls apart.
Procedure
- Open the configuration file of your custom Editor in a plain-text or XML editor.
- In the
extensionssection, locate theext:contextmenussection. Inside this section, create or find an<ext:add>element. - For each submenu you want to add to a context menu, insert an
ext:extensionelement that looks as follows:<ext:extension name="NewMenuItem" assignid="NewMenuItemID" insertbefore="cm_sep_1"> <ext:menudeclaration> <cmenu:ContextMenuItem name="MenuItem" type="submenu"> </cmenu:ContextMenuItem> <ext:menudeclaration> <ext:apply> <ext:view name="DashboardView"> <ext:control id="DashboardContextMenu" /> </ext:view> </ext:apply> </ext:extension>You can now add
cmenu:ContextMenuItemelements inside the newcmenu:ContextMenuItemelement to fill the submenu. - For each separator you want to add to a context menu insert an
ext:extensionelement that looks as follows:<ext:extension name="NewMenuItem" assignid="NewMenuItemID" insertbefore="cm_sep_1"> <ext:menudeclaration> <cmenu:ContextMenuItem name="MenuItem" type="separator" /> <ext:menudeclaration> <ext:apply> <ext:view name="DashboardView"> <ext:control id="DashboardContextMenu" /> </ext:view> </ext:apply> </ext:extension>This inserts a separator at the position you specify.
- Save and close your Editor's configuration file.