Remove Card Method landing.block.removecard

We are still updating this page

Some data may be missing here — we will complete it shortly.

Scope: landing

Who can execute the method: any user

The method landing.block.removecard removes a block card. It returns true or an error.

Parameters

Method

Description

Available since

lid
unknown

Page identifier

block
unknown

Block identifier

selector
unknown

Card selector taken from the manifest, with the card identifier added.
For example: '.landing-block-card@0'. The 0 at the end indicates that we are affecting the first card in order.

Warning

Please note that once you have removed a card, their counters have changed.

Examples

try
        {
        	const response = await $b24.callMethod(
        		'landing.block.removecard',
        		{
        			lid: 311,
        			block: 6057,
        			selector: '.landing-block-card@0'
        		}
        	);
        	
        	const result = response.getData().result;
        	console.info(result);
        }
        catch(error)
        {
        	console.error(error);
        }
        
try {
            $response = $b24Service
                ->core
                ->call(
                    'landing.block.removecard',
                    [
                        'lid'      => 311,
                        'block'    => 6057,
                        'selector' => '.landing-block-card@0',
                    ]
                );
        
            $result = $response
                ->getResponseData()
                ->getResult();
        
            echo 'Success: ' . print_r($result, true);
            // Your required data processing logic
            processData($result);
        
        } catch (Throwable $e) {
            error_log($e->getMessage());
            echo 'Error removing card: ' . $e->getMessage();
        }
        
BX24.callMethod(
            'landing.block.removecard',
            {
                lid: 311,
                block: 6057,
                selector: '.landing-block-card@0'
            },
            function(result)
            {
                if(result.error())
                {
                    console.error(result.error());
                }
                else
                {
                    console.info(result.data());
                }
            }
        );
        

How to Use Examples in Documentation