landing.landing.favoriteBlock
Scope: landing Permissions to execute: for all
landing.landing.favoriteBlock( lid, block, meta )
Method saves block available at the "My blocks" page. Returns new saved block ID.
Note: Method can be useful when deleting saved block.
Parameters
Method | Description | Available from version |
---|---|---|
lid | Page ID. | |
block | Block ID. | |
meta | Information object for saved block. Contains fields:
|
Example
BX24.callMethod( 'landing.landing.favoriteBlock', { lid: 11262, block: 81827, meta: { name: 'My block', section: ['text', 'text_image'], preview: 'https://mycdn.com/pic/1.jpg' } }, function(result) { if(result.error()) { console.error(result.error()); } else { console.info(result.data()); } } );
© «Bitrix24», 2001-2024