Get a list of available partner templates landing.demos.getList
We are still updating this page
Some data may be missing — we will fill it in shortly.
Scope:
landingWho can execute the method: any user
Description
The method landing.demos.getList retrieves a list of available partner templates for the current application.
Parameters
|
Parameter |
Description |
|
params |
Optional array with optional keys:
|
Entity fields
|
Field |
Description |
|
ID |
Record identifier. |
|
XML_ID |
Unique record code. |
|
APP_CODE |
Code of the current application. |
|
ACTIVE |
Activity status (Y / N). |
|
TITLE |
Title. |
|
DESCRIPTION |
Description. |
|
PREVIEW_URL |
Preview URL. |
|
TYPE |
Type of the created site (STORE, PAGE). |
|
TPL_TYPE |
Placed in the site/store (S) or page (P) creation wizard. |
|
MANIFEST |
Manifest. |
|
SHOW_IN_LIST |
Whether to show in the list of templates. |
|
PREVIEW / PREVIEW2X / PREVIEW3X |
Various sizes of previews. |
|
CREATED_BY_ID |
Identifier of the user who created the record. |
|
MODIFIED_BY_ID |
Identifier of the user who modified the record. |
|
DATE_CREATE |
Creation date. |
|
DATE_MODIFY |
Modification date. |
Examples
// callListMethod: Retrieves all data at once. Use only for small selections (< 1000 items) due to high memory usage.
try {
const response = await $b24.callListMethod(
'landing.demos.getList',
{
params: {
select: [
'ID', 'TITLE', 'MANIFEST'
],
filter: {
'>ID': '1'
}
}
},
(progress) => { console.log('Progress:', progress) }
)
const items = response.getData() || []
for (const entity of items) { console.log('Entity:', entity) }
} catch (error) {
console.error('Request failed', error)
}
// fetchListMethod: Retrieves data in parts using an iterator. Use it for large data volumes to optimize memory usage.
try {
const generator = $b24.fetchListMethod('landing.demos.getList', {
params: {
select: [
'ID', 'TITLE', 'MANIFEST'
],
filter: {
'>ID': '1'
}
}
}, 'ID')
for await (const page of generator) {
for (const entity of page) { console.log('Entity:', entity) }
}
} catch (error) {
console.error('Request failed', error)
}
// callMethod: Manually controls pagination through the start parameter. Use it for precise control of request batches. For large datasets, it is less efficient than fetchListMethod.
try {
const response = await $b24.callMethod('landing.demos.getList', {
params: {
select: [
'ID', 'TITLE', 'MANIFEST'
],
filter: {
'>ID': '1'
}
}
}, 0)
const result = response.getData().result || []
for (const entity of result) { console.log('Entity:', entity) }
} catch (error) {
console.error('Request failed', error)
}
try {
$response = $b24Service
->core
->call(
'landing.demos.getList',
[
'params' => [
'select' => [
'ID', 'TITLE', 'MANIFEST'
],
'filter' => [
'>ID' => '1'
]
]
]
);
$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 list of demos: ' . $e->getMessage();
}
BX24.callMethod(
'landing.demos.getList',
{
params: {
select: [
'ID', 'TITLE', 'MANIFEST'
],
filter: {
'>ID': '1'
}
}
},
function(result)
{
if(result.error())
console.error(result.error());
else
console.info(result.data());
}
);
How to Use Examples in Documentation