| name | bitrix-cms-basics |
| description | Covers CMS fundamentals โ sites, site templates, menus, page templates, includes, breadcrumbs, user groups, user fields, admin panel. Applied for site structure and content management tasks. Key terms โ CSite, template, menu, include area, user field, UF. |
CMS Basics
Baseline: main 23.0+. Features newer than baseline are marked Since.
Site management layer above the framework โ sites, templates, menus, content areas. Landing sites / Sites24: skill bitrix-landing.
Sites (Multisite)
ORM tablet: \Bitrix\Main\SiteTable โ table b_lang (main/lib/SiteTable.php). Legacy: CSite.
Key fields: LID (primary, e.g. s1), NAME, DIR, DOC_ROOT, SERVER_NAME, SITE_NAME, LANGUAGE_ID, CULTURE_ID, ACTIVE, DEF.
$site = \Bitrix\Main\SiteTable::getRow([
'filter' => ['=LID' => SITE_ID],
'select' => ['LID', 'DIR', 'SERVER_NAME', 'DOC_ROOT', 'LANGUAGE_ID'],
]);
$docRoot = \Bitrix\Main\SiteTable::getDocumentRoot(SITE_ID);
SITE_ID / SITE_DIR are available after kernel init. Resolve site by host/path: SiteTable::getByDomain($host, $directory).
Site Templates
Location: /local/templates/<template_id>/
/local/templates/mytemplate/
โโโ header.php
โโโ footer.php
โโโ styles.css
โโโ components/ # Template-level component overrides
โโโ page_templates/ # Page layout templates
โโโ lang/
#WORK_AREA# โ required placeholder in the site template (often a single-file template or between header.php / footer.php flow). The kernel injects the page body at #WORK_AREA#. Missing marker โ admin error โset the #WORK_AREA# separatorโ.
Template selected per site in Admin โ Sites โ Edit. Prefer /local/templates/, not /bitrix/templates/.
Section and Access Files
.section.php
Per-directory file (walked from current path up to site root). Typical contents:
<?php
$sSectionName = 'News';
$arDirProperties = [
'TITLE' => 'News section',
'keywords' => 'news, updates',
'description' => 'Company news',
];
$sSectionName โ used for breadcrumbs (GetNavChain).
$arDirProperties โ directory properties; read via $APPLICATION->GetDirProperty() / merged into $APPLICATION->GetProperty().
.access.php
Per-directory file permissions (PERM[...]). Managed by $APPLICATION->SetFileAccessPermission() / admin UI. Do not hand-edit unless you know the format; kernel includes it when resolving file rights.
Page Properties
$APPLICATION->SetPageProperty('title', 'About');
$APPLICATION->SetPageProperty('description', 'About the company');
$APPLICATION->SetPageProperty('keywords', 'about');
$title = $APPLICATION->GetPageProperty('title', 'Default');
$desc = $APPLICATION->GetProperty('description');
SetPageProperty / GetPageProperty โ current page only.
SetDirProperty / GetDirProperty โ directory props (often from .section.php).
GetProperty โ page โ dir โ default.
Common keys: title, description, keywords, plus custom uppercase IDs.
Menus
- Menu types per site (
top, left, โฆ).
- Files:
/.top.menu.php, /.left.menu.php in site root or section.
- Component:
bitrix:menu.
Page Templates
/local/templates/<id>/page_templates/ โ reusable layouts for the visual editor.
Include Areas
bitrix:main.include โ editable content blocks:
$APPLICATION->IncludeComponent('bitrix:main.include', '', [
'AREA_FILE_SHOW' => 'file',
'PATH' => '/include/phone.php',
]);
Files typically under /include/ or /local/include/.
Breadcrumbs
- Auto from
$sSectionName in .section.php along the path.
- Manual:
$APPLICATION->AddChainItem('Title', '/path/').
- Component:
bitrix:breadcrumb.
Users and Groups
CUser, \Bitrix\Main\UserTable โ users.
- Groups control permissions via
\CMain::GetUserRight() and group IDs.
- User fields (UF) โ
CUserTypeEntity, \Bitrix\Main\UserFieldTable; register in module DoInstall; access via USER.UF_* in ORM or user fields API.
Admin Panel
/bitrix/admin/ โ admin scripts. Custom pages via module install admin files, or modern UI (bitrix-ui). Legacy lists: CAdminList / CAdminForm.
Checklist