Bitrix Site Manager

Input parameter aliases

Each component has a set of variables in which it takes ID's or other attributes of requested information. For example, the component bitrix:catalog.section has variables IBLOCK_ID and SECTION_ID, in which it takes ID's of a catalog and a product group, respectively.

All components that belong to a compound component must have a uniform set of variables. For example, the compound component bitrix:catalog and its simple components (bitrix:catalog.list, bitrix:catalog.section etc.) can handle variables IBLOCK_ID, SECTION_ID, ELEMENT_ID etc.

If, when adding a component to a page, you want to redefine its variables, you have to provide the VARIABLE_ALIASES parameter.

In SEF mode, this parameter has the following format:

"VARIABLE_ALIASES" => array(
    "list" => array(),
    "section" => array(
        "IBLOCK_ID" => "BID",
        "SECTION_ID" => "ID"
    ),
    "element" => array(
        "SECTION_ID" => "SID",
        "ELEMENT_ID" => "ID"
    ),
)

Here, array keys are the same as keys of the path template array. An individual set of definitions can exist for each path.

In non-SEF mode, this parameter has the following format:

"VARIABLE_ALIASES" => array(
    "IBLOCK_ID" => "BID",
    "SECTION_ID" => "GID",
    "ELEMENT_ID" => "ID",
)

Example 1

Let us make the component bitrix:catalog that resides in /fld/cat.php work with the following paths:

/catalog/index.php (for a list of catalogs)
/catalog/section/код_группы.php?ID=код_каталога (for product group)
/catalog/product/код_товара.php?ID=код_группы (for product details)

The following parameters have to be specified in the input parameters:

"SEF_MODE" => "Y",
"SEF_FOLDER" => "/catalog/",
"SEF_URL_TEMPLATES" => array(
    "list" => "index.php",
    "section" => "section/#SECTION_ID#.php?ID=#IBLOCK_ID#",
    "element" => "element/#ELEMENT_ID#.php?ID=#SECTION_ID#"
),
"VARIABLE_ALIASES" => array(
    "list" => array(),
    "section" => array(
        "IBLOCK_ID" => "ID"
    ),
    "element" => array(
        "SECTION_ID" => "ID",
    ),
)

Example 2

Make the component bitrix:catalog that resides in /fld/cat.php work with the following paths:

/fld/cat.php (для списка каталогов)
/fld/cat.php?BID=код_каталога&SID=код_группы (для группы товаров)
/fld/cat.php?ID=код_товара&SID=код_группы (для детальной информации о товаре)

The following parameters have to be specified in the input parameters:

"SEF_MODE" => "N",
"VARIABLE_ALIASES" => array(
    "IBLOCK_ID" => "BID",
    "SECTION_ID" => "SID",
    "ELEMENT_ID" => "ID",
)