Documentation

landing.block.getcontent

landing.block.getcontent(
   lid,
   block,
   editMode,
   params 
)

This method gets the block content. Returns an array of the block content - html, style and JS files. Or an error.

Parameters

Method Description Available from version
lid Landing page ID
block Block ID
editMode Edit mode, yes (1) or no (0); returns different set of blocks
params Array of additional parameters. Presently, supports one key – wrapper_show – shows the wrapping system div (0, 1). By default - show.

Example

BX24.callMethod(
   'landing.block.getContent',
   {
      lid: 4858,
      block: 39556,
      editMode: 1,
      params: {
         wrapper_show: 0
      }
   },
   function(result)
   {
      if(result.error())
      {
         console.error(result.error());
      }
      else
      {
         console.info(result.data());
      }
   }
);


© «Bitrix24», 2001-2024