Get a list of templates for creating pages landing.demos.getPageList
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.demos.getPageList retrieves a list of available templates for creating pages, both partner and system templates.
Parameters
|
Parameter |
Description |
|
type |
Template type (page: regular sites, store: stores). |
Example
JS
PHP
BX24.js
try
{
const response = await $b24.callMethod(
'landing.demos.getPageList',
{
type: 'page'
}
);
const result = response.getData().result;
console.info(result);
}
catch( error )
{
console.error('Error:', error);
}
try {
$response = $b24Service
->core
->call(
'landing.demos.getPageList',
[
'type' => 'page'
]
);
$result = $response
->getResponseData()
->getResult();
if ($result->error()) {
error_log($result->error());
} else {
echo 'Success: ' . print_r($result->data(), true);
}
} catch (Throwable $e) {
error_log($e->getMessage());
echo 'Error getting page list: ' . $e->getMessage();
}
BX24.callMethod(
'landing.demos.getPageList',
{
type: 'page'
},
function(result)
{
if(result.error())
console.error(result.error());
else
console.info(result.data());
}
);
How to Use Examples in Documentation
Copied