Elementor 开发者文档

title: "Context Menu Groups" post_status: publish comment_status: open taxonomy: category: - elementor-developers-docs post_tag: - Context Menu - Src - Repos


Context Menu Groups

Context menu popups contain several groups divided by a separator. Each group contains a number of actions - groups are only displayed if they have at least one action.

Group Object

An Elementor context menu is basically a JS array of group objects. Each group object has two properties:

const group = {
    name: '',
    actions: [],
}

Available Groups

The built-in context menu groups for elements (section, column and widget) include:

Groups By Element Type

Below are the default groups displayed in each element:

Section

Section Context Menu


Column

Column Context Menu


Widget

Widget Context Menu


Manage Groups

To add, update or delete custom groups, you need to use the JavaScript elements/context-menu/groups filter hook. Please keep in mind that this hook doesn't change any built-in groups added by Elementor, it only allows external developers to add and modify new groups.