Компонент bitrix:catalog использует
"SEF_MODE" => "Y".
Изначально настройках заданы след. параметры:
"SEF_URL_TEMPLATES" => array(
"sections" => "",
"section" => "#SECTION_CODE#/",
"element" => "#SECTION_CODE#/#ELEMENT_CODE#/",
"compare" => "",
"smart_filter" => "",
)
Список элементов по адресу sitename.ru/#SECTION_CODE#/ работаем корректно.
Я хочу чтобы элементы открывались так -> sitename.ru/#ELEMENT_CODE#/. Поэтому пишу так:
"SEF_URL_TEMPLATES" => array(
"sections" => "",
"section" => "#SECTION_CODE#/",
"element" => "#ELEMENT_CODE#/",
"compare" => "",
Но для элементов вылезает ошибка 404. Где искать ответ? Внутри компонента bitrix:catalog? Или я в параметрах компонента что-то еще не задал? Полный код.
$APPLICATION->IncludeComponent(
"bitrix:catalog",
".default",
array(
"COMPONENT_TEMPLATE" => ".default",
"IBLOCK_TYPE" => "consult",
"IBLOCK_ID" => "17",
"SEF_MODE" => "Y",
"SEF_FOLDER" => "/",
"AJAX_MODE" => "N",
"AJAX_OPTION_JUMP" => "N",
"AJAX_OPTION_STYLE" => "Y",
"AJAX_OPTION_HISTORY" => "N",
"AJAX_OPTION_ADDITIONAL" => "",
"CACHE_TYPE" => "A",
"CACHE_TIME" => "36000000",
"CACHE_FILTER" => "N",
"CACHE_GROUPS" => "Y",
"USE_MAIN_ELEMENT_SECTION" => "Y",
"DETAIL_STRICT_SECTION_CHECK" => "N",
"SET_LAST_MODIFIED" => "Y",
"SET_TITLE" => "Y",
"ADD_SECTIONS_CHAIN" => "Y",
"ADD_ELEMENT_CHAIN" => "N",
"COMPOSITE_FRAME_MODE" => "A",
"COMPOSITE_FRAME_TYPE" => "AUTO",
"USE_FILTER" => "N",
"USE_REVIEW" => "N",
"ACTION_VARIABLE" => "action",
"PRODUCT_ID_VARIABLE" => "id",
"USE_COMPARE" => "N",
"PRICE_CODE" => array(),
"USE_PRICE_COUNT" => "N",
"SHOW_PRICE_COUNT" => "1",
"PRICE_VAT_INCLUDE" => "Y",
"PRICE_VAT_SHOW_VALUE" => "N",
"BASKET_URL" => "",
"USE_PRODUCT_QUANTITY" => "N",
"PRODUCT_QUANTITY_VARIABLE" => "quantity",
"ADD_PROPERTIES_TO_BASKET" => "Y",
"PRODUCT_PROPS_VARIABLE" => "prop",
"PARTIAL_PRODUCT_PROPERTIES" => "N",
"PRODUCT_PROPERTIES" => array(),
"SHOW_TOP_ELEMENTS" => "N",
"SECTION_COUNT_ELEMENTS" => "Y",
"SECTION_TOP_DEPTH" => "1",
"PAGE_ELEMENT_COUNT" => "40",
"LINE_ELEMENT_COUNT" => "1",
"ELEMENT_SORT_FIELD" => "sort",
"ELEMENT_SORT_ORDER" => "asc",
"ELEMENT_SORT_FIELD2" => "id",
"ELEMENT_SORT_ORDER2" => "desc",
"LIST_PROPERTY_CODE" => array(
0 => "TIME",
1 => "PRICE",
2 => "",
),
"INCLUDE_SUBSECTIONS" => "Y",
"LIST_META_KEYWORDS" => "-",
"LIST_META_DESCRIPTION" => "-",
"LIST_BROWSER_TITLE" => "-",
"SECTION_BACKGROUND_IMAGE" => "-",
"DETAIL_PROPERTY_CODE" => array(
0 => "TABLEPRICE",
1 => "",
),
"DETAIL_META_KEYWORDS" => "-",
"DETAIL_META_DESCRIPTION" => "-",
"DETAIL_BROWSER_TITLE" => "-",
"DETAIL_SET_CANONICAL_URL" => "Y",
"SECTION_ID_VARIABLE" => "SECTION_ID",
"DETAIL_CHECK_SECTION_ID_VARIABLE" => "N",
"DETAIL_BACKGROUND_IMAGE" => "-",
"SHOW_DEACTIVATED" => "N",
"LINK_IBLOCK_TYPE" => "",
"LINK_IBLOCK_ID" => "",
"LINK_PROPERTY_SID" => "",
"LINK_ELEMENTS_URL" => "link.php?PARENT_ELEMENT_ID=#ELEMENT_ID#",
"USE_STORE" => "N",
"PAGER_TEMPLATE" => ".default",
"DISPLAY_TOP_PAGER" => "N",
"DISPLAY_BOTTOM_PAGER" => "Y",
"PAGER_TITLE" => "Товары",
"PAGER_SHOW_ALWAYS" => "N",
"PAGER_DESC_NUMBERING" => "N",
"PAGER_DESC_NUMBERING_CACHE_TIME" => "36000",
"PAGER_SHOW_ALL" => "N",
"PAGER_BASE_LINK_ENABLE" => "N",
"SET_STATUS_404" => "Y",
"SHOW_404" => "Y",
"FILE_404" => "",
"COMPATIBLE_MODE" => "Y",
"USE_ELEMENT_COUNTER" => "Y",
"DISABLE_INIT_JS_IN_COMPONENT" => "Y",
"SEF_URL_TEMPLATES" => array(
"sections" => "",
"section" => "#SECTION_CODE#/",
"element" => "#ELEMENT_CODE#/",
"compare" => "",
"smart_filter" => "",
)
),
false
);