Bitrix Site Manager

Component description file - .description.php

The file .description.php contains the component description. The description is used when manipulating the component from within Bitrix Site Manager (e.g. in the visual editor), and in the site editing mode. The component itself does not use this file; it is not included when the component is activated (for example, when loading a page containing the component).

The file .description.php must reside in the component subfolder. The corresponding language message file is loaded automatically (it must reside in /lang/<language>/.description.php relative to the component folder).

A typical .description.php file has the following structure:

<?
$arComponentDescription = array(
   "NAME" => GetMessage("COMP_NAME"),
   "DESCRIPTION" => GetMessage("COMP_DESCR"),
   "ICON" => "/images/icon.gif",
   "PATH" => array(
      "ID" => "content",
      "CHILD" => array(
         "ID" => "catalog",
         "NAME" => "Product catalog"
      )
   ),
   "AREA_BUTTONS" => array(
      array(
         'URL' => "javascript:alert('This is a button!!!');",
         'SRC' => '/images/button.jpg',
         'TITLE' => "This is a button!"
      ),
   ),
   "CACHE_PATH" => "Y",
   "COMPLEX" => "Y"
);
?>

As you can see, the file declares the array $arComponentDescription, which describes the component. This array can have the following keys: