<? if(!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED!==true)die();
global $APPLICATION;
if(CModule::IncludeModule('iblock')) {
/*$IBLOCK_ID = 2; // ID инфоблока из которого берем элементы
$arOrder = Array('NAME'=>'ASC'); // Выбрать сортировку
$arSelect = Array('ID', 'NAME', 'IBLOCK_ID', 'DETAIL_PAGE_URL');
$arFilter = Array('IBLOCK_ID'=>$IBLOCK_ID, 'ACTIVE'=>'Y');
$res = CIBlockElement::GetList($arOrder, $arFilter, false, false, $arSelect);
while($ob = $res->GetNextElement()) {
$arFields = $ob->GetFields();
$aMenuLinksExt[] = Array(
$arFields['NAME'],
$arFields['DETAIL_PAGE_URL'],
Array(),
Array(),
''
);
}*/
$IBLOCK_ID = 10;
$arSelect = Array('ID', 'NAME', 'IBLOCK_ID', 'DEPTH_LEVEL', 'SECTION_PAGE_URL');
$arFilter = Array('IBLOCK_ID'=>$IBLOCK_ID, 'GLOBAL_ACTIVE'=>'Y', 'DEPTH_LEVEL'=>1);
$rsSect = CIBlockSection::GetList(array('NAME' => 'ASC'),$arFilter, false, $arSelect);
while ($arSect = $rsSect->GetNext())
{
$aMenuLinksExt[] = Array(
$arSect['NAME'],
$arSect['SECTION_PAGE_URL'],
Array(),
Array(),
''
);
}
}
$aMenuLinks = array_merge($aMenuLinksExt, $aMenuLinks);
?>