Change the anchor character code landing.block.changeAnchor
We are still updating this page
Some data may be missing here — we will fill it in shortly.
Scope:
landingWho can execute the method: any user
The method landing.block.changeAnchor changes the anchor character code. By default, the anchor looks like this: #block12345, where 12345 is the block identifier.
Parameters
|
Method |
Description |
Available since |
|
lid |
Page identifier. |
|
|
block |
Block identifier. |
|
|
data |
Anchor character code. |
Examples
JS
PHP
BX24.js
try
{
const response = await $b24.callMethod(
'landing.block.changeAnchor',
{
lid: 3496,
block: 29356,
data: 'about'
}
);
const result = response.getData().result;
console.info(result);
}
catch( error )
{
console.error(error);
}
try {
$response = $b24Service
->core
->call(
'landing.block.changeAnchor',
[
'lid' => 3496,
'block' => 29356,
'data' => 'about',
]
);
$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 changing anchor: ' . $e->getMessage();
}
BX24.callMethod(
'landing.block.changeAnchor',
{
lid: 3496,
block: 29356,
data: 'about'
},
function (result)
{
if (result.error())
{
console.error(result.error());
}
else
{
console.info(result.data());
}
}
);
How to Use Examples in Documentation
Copied
Previous
Next