CNS Menu

Dynamic Menus

<- Back to CNS Menu function list

XML: deletemenuitem Tag

Description

This tag allows you to delete a menu item from any menu you have previously defined. This tag is used by itself and does not need to appear within <menu> or <submenu> tags. You need to at least define the name attribute to have a valid <deletemenuitem> tag. This is an empty tag, so you can either use a forward-slash before the closing angled bracket ("/>") or follow the tag immediately with a closing </deletemenuitem> tag. This tag has one attribute, which is required.

Format
<deletemenuitemname="menu item path"/>

Required Attributes
  • name
    Defines the "path" to the menu item that you are deleting. The "path" is made up of the menu name, followed by any submenu names, followed by the actual name of the menu item, all separated with the forward-slash, and looks like "menu name/submenu name/menu item name".

Related Items
XML: insertmenuitem Tag, XML: updatemenuitem Tag
Examples

Example 1

Code:

&lt;deletemenuitem name="my menu/Click Me" /&gt;

Result:

Deletes the menu item named "Click Me" from the menu named "my menu".

Example 2

Code:

&lt;deletemenuitem name="my menu/See Also/Plants" /&gt;

Result:

Deletes the menu item named "Plants" from the sub menu named "See Also" of the menu named "my menu".