Entity Blocks
We are still updating this page
Some data may be missing — we will complete it soon.
Quick navigation: all methods
A block is HTML code accompanied by a manifest file. Here is an example of a simple block:
<section class="landing-block">
<div class="text-center g-color-gray-dark-v3 g-pa-10">
<div class="g-width-600 mx-auto">
<div class="landing-block-node-text g-font-size-12 ">
<p>© 2017 All rights reserved. Developed by
<a href="#" class="landing-block-node-link g-color-primary">Bitrix24</a></p>
</div>
</div>
</div>
</section>
It is important to remember that when blocks are rendered (both in edit mode and view mode), they are wrapped in a special wrapper <div id="anchor" class="block-wrapper block-code">...</div>, where:
- anchor – the anchor of the block, if not changed by the user, will be in the format block123, where 123 is the block ID;
- block-wrapper – a common class for all blocks;
- block-code – a class that depends on the block code, where code is the actual code of the block (converted to a safe format).
Warning
In edit mode, copies of all blocks are created before they are published. Accessing blocks by ID should refer to the draft versions of the blocks.
You can order the layout of new blocks from a specialist or use the additional blocks offered by the vendor.
Overview of Methods
|
Method |
Description |
Available since |
|
Method for cloning a block card. |
||
|
Method for removing a block. |
||
|
Method for changing the content of a block. |
||
|
Method to change the tag name. |
||
|
Method for changing the attributes of a block node. |
||
|
Method for changing the styles of a block. |
||
|
Method for retrieving the content of a block. |
||
|
Method for getting a list of blocks on the page. |
||
|
Method for retrieving a block by its identifier. |
||
|
Method for retrieving the manifest of a specific block already placed on the page. |
||
|
Method for retrieving the manifest of a block from the repository. |
||
|
Method returns a list of blocks from the repository. |
||
|
Method uploads an image and associates it with the specified block. |
||
|
Method updates the content of a block already placed on the page to any arbitrary content. |
||
|
Method fully replicates the work of landing.block.clonecard but allows inserting a card with modified content immediately. |
||
|
Method for bulk updating block cards. |
||
|
Method changes the symbolic code of the anchor. |
||
|
Method retrieves the content of a block from the repository "as is" before adding the block to any page. |
18.7.500 |