Blame view

.left.menu_ext.php 1.12 KB
2fe1e5ce8   Андрей Ларионов   Первый коммит на ...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
  <?
  if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
  
  global $APPLICATION;
  $aMenuLinksExt = array();
  
  if(CModule::IncludeModule('iblock'))
  {
  	$arFilter = array(
  		"TYPE" => "catalog",
  		"SITE_ID" => SITE_ID,
  	);
  
  	$dbIBlock = CIBlock::GetList(array('SORT' => 'ASC', 'ID' => 'ASC'), $arFilter);
  	$dbIBlock = new CIBlockResult($dbIBlock);
  
  	if ($arIBlock = $dbIBlock->GetNext())
  	{
  		if(defined("BX_COMP_MANAGED_CACHE"))
  			$GLOBALS["CACHE_MANAGER"]->RegisterTag("iblock_id_".$arIBlock["ID"]);
  
  		if($arIBlock["ACTIVE"] == "Y")
  		{
  			$aMenuLinksExt = $APPLICATION->IncludeComponent("bitrix:menu.sections", "bootstrap_v4", array(
  				"IS_SEF" => "Y",
  				"SEF_BASE_URL" => "",
  				"SECTION_PAGE_URL" => $arIBlock['SECTION_PAGE_URL'],
  				"DETAIL_PAGE_URL" => $arIBlock['DETAIL_PAGE_URL'],
  				"IBLOCK_TYPE" => $arIBlock['IBLOCK_TYPE_ID'],
  				"IBLOCK_ID" => $arIBlock['ID'],
  				"DEPTH_LEVEL" => "3",
  				"CACHE_TYPE" => "N",
  			), false, Array('HIDE_ICONS' => 'Y'));
  		}
  	}
  
  	if(defined("BX_COMP_MANAGED_CACHE"))
  		$GLOBALS["CACHE_MANAGER"]->RegisterTag("iblock_id_new");
  }
  
  $aMenuLinks = array_merge($aMenuLinks, $aMenuLinksExt);
  ?>