Documentation

landing.block.changeNodeName

landing.block.changeNodeName(lid, block,data)

The method modifies the tag name. For example, tag h3 must be changed to tag h1. Returns true on success or an error.

Parameters

Method Description Available from version
lid Landing page ID
block Block ID
data Array of selectors and new values. See example for details.
Selector can be passed via both without indicated position (for example, .landing-block-node-text), then all cards are modified for this selector - and with an indicated position (for example, .landing-block-node-text@2), then only the card at the specified position is modified (starting from zero).

Example

BX24.callMethod(
   'landing.block.changeNodeName',
   {
      lid: 2006,
      block: 20476,
      data: {
         '.landing-block-node-small-title@0': 'i',
         '.landing-block-node-small-title@1': 'u'
      }
   },
   function (result)
   {
      if (result.error())
      {
         console.error(result.error());
      }
      else
      {
         console.info(result.data());
      }
   }
);


© «Bitrix24», 2001-2024