Проблема заключается в следующем при входе в некоторые разделы в arResult который получает компонент меню приходит массив в котором Selected проставлено не только у того раздела на который нажали, но и у другого раздела. В результате при хождении по каталогу меню периодически слева отображает не тот раздел в котором находимся
Вошли в /catalog2/mebel/ , а в компоненте вернулся вот такой массив....
Идеи ???
[CODE]
[21] => Array
(
[TEXT] => Игрушки
[LINK] => /catalog2/toys/
[SELECTED] => 1
[PERMISSION] => X
[ADDITIONAL_LINKS] => Array
(
[0] => /catalog2/toys/
)
[ITEM_TYPE] => D
[ITEM_INDEX] => 21
[PARAMS] => Array
(
[FROM_IBLOCK] => 1
[IS_PARENT] => 1
[DEPTH_LEVEL] => 1
)
[DEPTH_LEVEL] => 1
[IS_PARENT] => 1
)
.....................................................
[43] => Array
(
[TEXT] => Мебель
[LINK] => /catalog2/mebel/
[SELECTED] => 1
[PERMISSION] => X
[ADDITIONAL_LINKS] => Array
(
[0] => /catalog2/mebel/
)
[ITEM_TYPE] => D
[ITEM_INDEX] => 43
[PARAMS] => Array
(
[FROM_IBLOCK] => 1
[IS_PARENT] => 1
[DEPTH_LEVEL] => 1
)
[DEPTH_LEVEL] => 1
[IS_PARENT] => 1
)
[/CODE]
Подключаем типовое left меню для каталога из разделов каталога в .left.menu_ext.php[CODE]<?
if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
global $APPLICATION;
if (!function_exists("GetTreeRecursive")) //Include from main.map component
{
$aMenuLinksExt=$APPLICATION->IncludeComponent("bitrix:menu.sections", "", array(
"IBLOCK_TYPE_ID" => "CATALOG",
"IBLOCK_ID" => "25",
"CACHE_TYPE" => "A",
"DEPTH_LEVEL" => "4",
"CACHE_TIME" => "36000000"
),
false,
Array('HIDE_ICONS' => 'Y')
);
$aMenuLinks = array_merge($aMenuLinks, $aMenuLinksExt);
}
?>
[/CODE]
Компонент каталога в index.php
[CODE]<?
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/header.php");
$APPLICATION->SetTitle("");
?> <?$APPLICATION->IncludeComponent("bitrix:catalog", "catalog2", array(
"IBLOCK_TYPE" => "catalog",
"IBLOCK_ID" => "25",
"HIDE_NOT_AVAILABLE" => "N",
"BASKET_URL" => "/personal/cart/",
"ACTION_VARIABLE" => "action",
"PRODUCT_ID_VARIABLE" => "id",
"SECTION_ID_VARIABLE" => "SECTION_ID",
"PRODUCT_QUANTITY_VARIABLE" => "quantity",
"PRODUCT_PROPS_VARIABLE" => "prop",
"SEF_MODE" => "Y",
"SEF_FOLDER" => "/catalog2/",
"AJAX_MODE" => "N",
"AJAX_OPTION_JUMP" => "N",
"AJAX_OPTION_STYLE" => "Y",
"AJAX_OPTION_HISTORY" => "N",
"CACHE_TYPE" => "A",
"CACHE_TIME" => "36000000",
"CACHE_FILTER" => "N",
"CACHE_GROUPS" => "Y",
"SET_TITLE" => "N",
"SET_STATUS_404" => "Y",
"USE_ELEMENT_COUNTER" => "Y",
"USE_FILTER" => "Y",
"FILTER_NAME" => "",
"FILTER_FIELD_CODE" => array(
0 => "NAME",
1 => "",
),
"FILTER_PROPERTY_CODE" => array(
0 => "SALELEADER",
1 => "",
),
"FILTER_PRICE_CODE" => array(
0 => "BASE",
),
"USE_REVIEW" => "N",
"USE_COMPARE" => "N",
"PRICE_CODE" => array(
0 => "BASE",
),
"USE_PRICE_COUNT" => "Y",
"SHOW_PRICE_COUNT" => "",
"PRICE_VAT_INCLUDE" => "Y",
"PRICE_VAT_SHOW_VALUE" => "N",
"PRODUCT_PROPERTIES" => array(
),
"USE_PRODUCT_QUANTITY" => "Y",
"CONVERT_CURRENCY" => "N",
"QUANTITY_FLOAT" => "N",
"SHOW_TOP_ELEMENTS" => "N",
"SECTION_COUNT_ELEMENTS" => "N",
"SECTION_TOP_DEPTH" => "1",
"PAGE_ELEMENT_COUNT" => COption::GetOptionInt("eshop","catalogElementCount","25",SITE_ID),
"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 => "",
1 => "SPECIALOFFER",
2 => "",
),
"INCLUDE_SUBSECTIONS" => "Y",
"LIST_META_KEYWORDS" => "-",
"LIST_META_DESCRIPTION" => "-",
"LIST_BROWSER_TITLE" => "NAME",
"DETAIL_PROPERTY_CODE" => array(
0 => "",
1 => "RECOMMEND",
2 => "",
),
"DETAIL_META_KEYWORDS" => "keywords",
"DETAIL_META_DESCRIPTION" => "description",
"DETAIL_BROWSER_TITLE" => "title",
"LINK_IBLOCK_TYPE" => "",
"LINK_IBLOCK_ID" => "",
"LINK_PROPERTY_SID" => "",
"LINK_ELEMENTS_URL" => "link.php?PARENT_ELEMENT_ID=#ELEMENT_ID#",
"USE_ALSO_BUY" => "Y",
"ALSO_BUY_ELEMENT_COUNT" => "3",
"ALSO_BUY_MIN_BUYES" => "2",
"USE_STORE" => "Y",
"USE_STORE_PHONE" => "N",
"USE_STORE_SCHEDULE" => "N",
"USE_MIN_AMOUNT" => "Y",
"MIN_AMOUNT" => "10",
"STORE_PATH" => "/store/#store_id#",
"MAIN_TITLE" => "Наличие на складах",
"DISPLAY_TOP_PAGER" => "N",
"DISPLAY_BOTTOM_PAGER" => "Y",
"PAGER_TITLE" => "Товары",
"PAGER_SHOW_ALWAYS" => "N",
"PAGER_TEMPLATE" => "arrows",
"PAGER_DESC_NUMBERING" => "N",
"PAGER_DESC_NUMBERING_CACHE_TIME" => "36000000",
"PAGER_SHOW_ALL" => "N",
"PATH_TO_SHIPPING" => "#SITE_DIR#about/delivery/",
"DISPLAY_IMG_WIDTH" => "180",
"DISPLAY_IMG_HEIGHT" => "225",
"DISPLAY_DETAIL_IMG_WIDTH" => "280",
"DISPLAY_DETAIL_IMG_HEIGHT" => "280",
"DISPLAY_MORE_PHOTO_WIDTH" => "280",
"DISPLAY_MORE_PHOTO_HEIGHT" => "280",
"SHARPEN" => "280",
"AJAX_OPTION_ADDITIONAL" => "",
"SEF_URL_TEMPLATES" => array(
"sections" => "",
"section" => "#SECTION_CODE#/",
"element" => "#SECTION_CODE#/#ELEMENT_CODE#/",
"compare" => "compare/",
)
),
false
);?><?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/footer.php");?>
[/CODE]