Menu Blocks
Choose a tool for developing with an AI agent:
- use Alaio Vibecode to build an app for Bitrix24 from a task description without knowing any programming language. The agent writes the code and deploys the app to a server, with no manual hosting setup
- use the MCP server to develop a REST API integration in your own project. The agent refers to the official REST documentation
Menu blocks are components that can be automatically populated with links. This behavior is enabled through subtype: menu in the block section of the block manifest.
For blocks of this type in landing, two data sources are used:
catalogfor the store catalog menupersonalfor the personal account menu
Catalog Menu
This is a menu block variant for the store catalog. When adding the block, the system populates it with menu items from the current catalog.
Example manifest:
'block' => array(
'name' => 'Menu with logo on the left and menu items on the right',
'section' => 'menu',
'subtype' => 'menu',
'subtype_params' => array(
'selector' => '.landing-block-node-menu-list-item-link',
'count' => 5,
'source' => 'catalog',
),
),
Where:
- selector - the link selector where the menu items are inserted
- count - the limit on the number of automatically added items
- source - for the catalog menu, use the value
catalog
In standard blocks, the selector parameter points to the link where the menu items are inserted. For example, this could be .landing-block-node-menu-list-item-link or .landing-block-node-list-item. The count parameter is not present in all blocks.
Personal Account Menu
If the source is set to personal, the system will insert a predefined set of links for the personal account. Typically, this menu includes links to the main sections of the personal account, such as orders, profile, and cart.
Important Considerations
source: catalogis suitable for store and catalog blockssource: personalis suitable for personal account menus- The set of parameters depends on the specific block's markup. The
selectoris usually used for automatic population - In standard examples, the block also has a
dynamicparameter set tofalse - In standard blocks for menus, the
landing_menuextension is often included, and in some headers,landing_headeris additionally used
For a block with source: catalog, the corresponding store or catalog context is required. If such context is not present, automatic menu population may not work.
To ensure the menu block is populated automatically, check the data source and block markup in advance. For catalog and personal, a correct selector is usually needed.