Removing and Disabling Menu Items

You can also remove or disable menu items when the user displays a topic. If you remove a menu item from a topic, the menu item doesn't appear on the menu when the user displays that topic (by jumping to it, selecting it from a search or history list, or choosing the Back button or a browse button to display it). If you disable a menu item, the menu item appears dimmed on the menu. The menu item doesn't appear or remains dimmed until the user quits Viewer or loads a new title. The procedure for removing and disabling menu items in individual topics is much the same as the procedure for adding menu items.

To remove an authored menu item from a topic, enter the DeleteItem command as exclamation-point footnote. To disable the menu item, type the DisableItem command. These commands have the following syntax:

DeleteItem("item-id")
DisableItem("
item-id")

In either command, item-id is the ID, enclosed in quotes, you assigned in the AppendItem command. For example, using our earlier example, you might enter the following footnote to remove the Time menu item from the Utilities menu:

!DeleteItem("time_btn")

Enter the following footnote to disable the Time menu item:

!DisableItem("time_btn")

The Utilities menu with the disabled Time menu item appears as follows: