Set Included Areas for the Page landing.template.setLandingRef
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.template.setLandingRef sets the included areas for the page within a specific template (the page must already be linked to the template via the TPL_ID field). It will return true on success or an error.
Parameters
|
Parameter |
Description |
|
id |
Identifier of the page. |
|
data |
Array of data to set (if the array is empty or not provided, the included areas will be reset). The keys of the array are the identifiers of the areas, and the values are the identifiers of the pages that need to be set as the area. |
Examples
JS
PHP
BX24.js
try
{
const response = await $b24.callMethod(
'landing.template.setLandingRef',
{
id: 557,
data: {
1: 614,
2: 615,
3: 616
}
}
);
const result = response.getData().result;
console.info(result);
}
catch(error)
{
console.error(error);
}
try {
$response = $b24Service
->core
->call(
'landing.template.setLandingRef',
[
'id' => 557,
'data' => [
1 => 614,
2 => 615,
3 => 616
]
]
);
$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 setting landing reference: ' . $e->getMessage();
}
BX24.callMethod(
'landing.template.setLandingRef',
{
id: 557,
data: {
1: 614,
2: 615,
3: 616
}
},
function(result)
{
if(result.error())
{
console.error(result.error());
}
else
{
console.info(result.data());
}
}
);
How to Use Examples in Documentation
Copied
Previous