Remove Card Method landing.block.removecard
We are still updating this page
Some data may be missing here — we will complete it shortly.
Scope:
landingWho 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 |
Page identifier |
|
|
block |
Block identifier |
|
|
selector |
Card selector taken from the manifest, with the card identifier added. |
Warning
Please note that once you have removed a card, their counters have changed.
Examples
JS
PHP
BX24.js
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
Copied
Previous