What this solution does
The 'Custom Properties' module provides a centralized repository for typed data on 1C-Bitrix sites. Contact details in the header, office addresses, footer signatures, document links, images, and promotional text are often used across multiple templates and components simultaneously. Storing such values directly in code is inconvenient, while creating a separate information block for a small set of settings is excessive.
The module adds an administrative section 'Content → Custom Properties'. Here, you can create fields of the required type and change their values using the standard 1C-Bitrix interface. A developer needs to implement a component or call the PHP API only once; thereafter, content can be updated without editing site files.
Capabilities:
Single repository for general site data and settings.
Standard 1C-Bitrix user field types: string, number, date, list, file, and others.
Support for single and multiple values.
Visual HTML editor.
Language selection from registered system languages.
Output via the tidx:customprops.value component.
PHP API for using values in templates and business logic.
Default value configuration.
The module supports automatic, text, and raw formatting, as well as the output of images and file links. Editing is available from the public section using standard permission checks for user fields. Additional information block property types Yes/No and Language are supported. Optional integration with sprint.migration allows for the migration of field structures, values, and files.
This solution is suitable for storing phone numbers, addresses, and working hours, headings and explanatory texts, limits and numeric parameters, legal texts and document links, images, banners, and files, as well as HTML blocks for site templates. It also supports storing other values used simultaneously in the interface and program logic.
Key advantages: no separate information block or highload block is required, property structures are defined for specific projects, values are edited using standard 1C-Bitrix tools, and the component can be placed via the visual editor. A simple PHP API is available, access rights are supported, and the module does not alter the site template or generate demo data.
Example of value output via the component:
$APPLICATION->IncludeComponent(
'tidx:customprops.value',
'',
[
'CODE' => 'UF_PHONE',
Example of retrieving a property value via the PHP API:
Use the Values class from the Tidx\CustomProps namespace. First, include the module using Loader::includeModule('tidx.customprops'), then call the getString method with the property identifier, such as UF_PHONE.
System requirements:
PHP version 8.1 or newer is required.
The fileman module is needed for the visual HTML editor.
The iblock module is required for additional infoblock property types.
The fileman, iblock, and sprint.migration modules are not mandatory for the basic operation of the storage system.
General iT can install “Custom properties”, configure its settings and verify its operation in the existing project.