Template View Fields
Choose a tool for developing with an AI agent:
- use Alaio Vibecode to build an app for Bitrix24 from a task description without knowing any programming language. The agent writes the code and deploys the app to a server, with no manual hosting setup
- use the MCP server to develop a REST API integration in your own project. The agent refers to the official REST documentation
Template view fields define the structure Bitrix24 uses to assemble a site page: the placement of the main content and additional areas. The landing.template.getlist method returns these fields for templates in the current Bitrix24 account.
Scope:
landingWho can retrieve the fields: a user with access to the "Sites and Stores" section
How to Retrieve Template Fields
Pass the names of the fields you need in params.select of the landing.template.getlist method. For example, to retrieve the template's external code, the number of additional areas, and the markup with their macros:
{
"params": {
"select": ["ID", "XML_ID", "AREA_COUNT", "CONTENT"]
}
}
If select is omitted, the method returns all available fields. The fields in the table below can be selected, filtered, sorted, and grouped. Fields with a dot in select and filter, such as CREATED_BY.NAME, are not supported.
Template View Fields
|
Field |
Description |
|
ID |
Identifier of the template view |
|
ACTIVE |
Activity status of the template view Possible values: Default — |
|
AREA_COUNT |
Number of additional areas in the template, besides the main area |
|
SORT |
Sorting order of the template |
|
TITLE |
Title of the template. For system templates, the value may be localized for the current language of the account |
|
XML_ID |
External code of the template. It is convenient to use for matching templates in integration without relying on the internal |
|
CONTENT |
HTML markup of the template with area macros, such as |
|
CREATED_BY_ID |
Identifier of the user who created the template |
|
MODIFIED_BY_ID |
Identifier of the user who last modified the template |
|
DATE_CREATE |
Date and time of template creation. In the REST response, it is returned as a string. The format depends on the regional settings of the account, for example, |
|
DATE_MODIFY |
Date and time of the last modification of the template. In the REST response, it is returned as a string. The format depends on the regional settings of the account, for example, |
How CONTENT and AREA_COUNT Relate
In CONTENT, the #CONTENT# macro marks the main area of the page. The #AREA_1#, #AREA_2#, and subsequent macros mark additional areas to which separate pages can be linked. Their number is specified in AREA_COUNT.
For example, a fragment of template markup with one additional area might look like this:
<main>#CONTENT#</main>
<aside>#AREA_1#</aside>
In this example, AREA_COUNT = 1: #CONTENT# is not counted as an additional area. To find the area number for a particular template, retrieve its CONTENT using the landing.template.getlist method. The landing.template.setSiteRef and landing.template.setLandingRef methods set the links between pages and areas for a site and an individual page.
Continue Learning
- Retrieve a list of templates — Get a List of View Templates landing.template.getlist
- Retrieve area links for a page or site — Get a List of Included Areas for the landing.template.getLandingRef Page, Get a List of Included Areas for the Site landing.template.getSiteRef
- Set area links for a page or site — Set Included Areas for landing.template.setLandingRef Page, Set Included Areas for the Site landing.template.setSiteRef