Get a list of blocks from the repository landing.block.getrepository
We are still updating this page
Some data may be missing — we will complete it shortly.
Scope:
landingWho can execute the method: any user
The method landing.block.getrepository returns a list of blocks from the repository or an error.
Parameters
|
Method |
Description |
Available since |
|
section |
Section code of the repository (the list is provided above) |
Examples
JS
PHP
BX24.js
try
{
const response = await $b24.callMethod(
'landing.block.getrepository',
{
section: 'about'
}
);
const result = response.getData().result;
console.info(result);
}
catch( error )
{
console.error(error);
}
try {
$response = $b24Service
->core
->call(
'landing.block.getrepository',
[
'section' => '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 getting repository blocks: ' . $e->getMessage();
}
BX24.callMethod(
'landing.block.getrepository',
{
section: 'about'
},
function(result)
{
if(result.error())
{
console.error(result.error());
}
else
{
console.info(result.data());
}
}
);
How to Use Examples in Documentation
Copied
Next