landing.block.updatecontent
landing.block.updatecontent(lid, block, content)
The method updates the contents of a block that is already published on a landing page. To modify such contents, use the method landing.block.updatenodes. Returns true on success or an error otherwise.
Important!
-When the new block layout does not correspond with its current manifest, this block may be unavailable for editing.
- Content is passed through sanitizer that may delete some suspicious attributes and tags.
Parameters
Method | Description | Available from version |
---|---|---|
lid | Landing page ID | |
block | Block ID | |
content | New block content |
The style attribute can be removed by the in-built sanitizer. To avoid this, use the attribute bxstyle instead. When added, the system converts it to a standard style attribute.
Example
BX24.callMethod( 'landing.block.updatecontent', { lid: 625, block: 11883, content: 'My super content
' }, function(result) { if(result.error()) { console.error(result.error()); } else { console.info(result.data()); } } );
© «Bitrix24», 2001-2024