Working with Page Blocks: Overview of Methods
If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the MCP server so that the assistant can utilize the official REST documentation.
The group of methods manages page blocks in edit mode. It allows you to add new blocks, change their order, hide, delete, restore, and save them to "My Blocks."
These methods modify blocks in the draft version of the page. If the page is already published, the block in the published version and the one in the edit version may have different identifiers. To make changes, pass the identifier of the block from the edit version. You can obtain it using the landing.block.getList method with the parameter params.edit_mode = 1. After making changes, publish the page using the landing.landing.publication method.
Quick Navigation: All Methods
How to Work with Blocks
-
Obtain the page identifier using the landing.landing.getList method or use the
lidreturned by the landing.landing.add, landing.landing.addByTemplate, and landing.landing.copy methods. -
If you need to work with an existing block, retrieve the list of blocks using the landing.block.getList method with the parameter
params.edit_mode = 1. -
Choose the appropriate action based on your scenario:
- landing.landing.addblock — add a new block from the repository. Available block codes are returned by landing.block.getrepository.
- landing.landing.copyblock — copy a block.
- landing.landing.moveblock, landing.landing.upblock, landing.landing.downblock — change the position of a block.
- landing.landing.hideblock and landing.landing.showblock — manage the visibility of a block.
- landing.landing.markdeletedblock, landing.landing.markundeletedblock, landing.landing.deleteblock — temporarily or permanently delete a block.
- landing.landing.favoriteBlock and landing.landing.unFavoriteBlock — work with saved blocks.
-
After making changes, publish the page using the landing.landing.publication method.
Considerations
The scope parameter defines the internal type of the site or page. It is not related to the access permission landing. For pages in the knowledge, group, and mainpage scopes, provide the correct scope, otherwise the method may not find the page or block.
How to Choose a Method
|
If you need |
Method |
|
Add a new block from the repository to the page |
|
|
Copy a block to the same or another page |
|
|
Move a block to another page |
|
|
Change the order of a block on the page |
|
|
Temporarily hide or show a block again |
|
|
Mark a block as deleted or restore it |
landing.landing.markdeletedblock or landing.landing.markundeletedblock |
|
Permanently delete a block from the page |
|
|
Save a block to "My Blocks" or remove it from saved |
landing.landing.favoriteBlock or landing.landing.unFavoriteBlock |
Relationships with Other Objects
List of Page Blocks. The landing.block.getList method returns the composition of the page and the current state of its blocks.
Block Repository. The repository stores codes for standard blocks and blocks registered by the application. For an application block, use a code in the format repo_<ID>.
Preview File. For landing.landing.favoriteBlock, the identifier of the preview file is returned by landing.block.uploadfile.
Overview of Methods
Scope:
landingWho can execute the method: a user with permission to edit the page
Adding and Copying
|
Method |
Description |
|
Adds a new block to the page |
|
|
Copies a block to the page |
|
|
Saves a block to "My Blocks" |
|
|
Removes a block from "My Blocks" |
Position and Visibility
|
Method |
Description |
|
Moves a block on the page |
|
|
Moves a block up one position |
|
|
Moves a block down one position |
|
|
Hides a block on the page |
|
|
Shows a block on the page |
Deletion and Restoration
|
Method |
Description |
|
Deletes a block from the page |
|
|
Marks a block as deleted without physically removing it |
|
|
Restores a block from deleted status |