Documentation

landing.block.clonecard

landing.block.clonecard(lid, block,selector)

This method clones block element. Returns True or an error.

Parameters

Method Description Available from version
lid Landing page ID
block Block ID
selector Block element selector, taken from the manifest, with added block element ID.
For example: '.landing-block-card@0'. '0' at the end signifies the first card to be affected in sequence.

Note: as soon as you cloned a card, both card counters have changed.

See Also

[link=7204991]landing.block.addcard[/link] - the method works completely the same as landing.block.clonecard but offers an option to insert a card with already modified content.

Examples

BX24.callMethod(
	'landing.block.cloneCard',
	{
		lid: 311,
		block: 6057,
		selector: '.landing-block-card@0'
	},
	function(result)
	{
		if(result.error())
		{
			console.error(result.error());
		}
		else
		{
			console.info(result.data());
		}
	}
);


© «Bitrix24», 2001-2024