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