Bitrix Site Manager

Component folder structure

The component folder can contain the following subfolders and files.


Folder Description
help The help folder contains component help files. Help sections can be represented in many languages, each of which should be stored in a folder named after the language abbreviation. Each language folder must have a index.php file, which is the main help file for the corresponding language. For example, the path name of the English help file can be /help/en/index.php.

You should describe the structure of an array in which the component returns data to a template.

The help folder is optional.
install Contains installation and uninstallation scripts. The installation script must have name install.php, and the uninstallation script - uninstall.php. The install folder is optional.
lang This folder contains subfolders with text messages. Subfolder names are the abbreviations of languages in which the text messages are stored. A good practice is to save a text message file under the same name as a corresponding file of the component, and store it in the same folder hierarchy. For example, the file with English messages for /install/uninstall.php is to be saved in /lang/en/install/uninstall.php. The lang folder is optional if the component does not use language-dependent messages.
templates Contains component display templates. This folder is optional if the component does not use display templates.


File Description
component.php This is the core file containing the component logic. This file must exist.
.description.php Contains the name and the description of the component. Also it describes the component disposition in the visual editor component pane. This file must exist.
.parameters.php Contains the description of the component input parameters. This file must exist if the component uses input parameters.
Any other files and folders with resources required by the component. All the private component resources must be located inside the component folder.