A compound component template can contain the following files and folders.
- Subfolder lang 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 /section.php
is to be saved in /lang/en/section.php.
The lang folder
is optional if the component does not use language-dependent messages.
- The file result_modifier.php is included immediately before the
inclusion of component template. This file takes the component results as an
array $arResult, and the component input array $arParams. This
allows to change the contents of $arResult as required.
- The file style.css which defines styles required by a given
template. Can be used if the component needs custom non-standard styles.
style.css is included automatically if it exists. This file is
- The file script.js contains scripts required by the template;
exists. This file is optional.
- .description.php contains the template name and description for use
in the visual editor. This file is optional.
- .parameters.php contains the description of input parameters for
use in the visual editor. This file is optional.
- Files name.ext which are templates of the compound component pages.
extension ext depends on the templating language in which the template
is written. php is the default extension. Each page must have a
corresponding file name.ext.
- Templates of simple components that are members of the compound
one. These templates should reside in folders /namespace/simple
component name/ relative to the component folder.
- Any other files and folders with resources required by the component.
Simple components that belong to compound components are activated in page teampltes of a compound component.