• Модуль: intranet
  • Путь к файлу: ~/bitrix/modules/intranet/classes/general/utils.php
  • Класс: CIntranetUtils
  • Вызов: CIntranetUtils::GetIBlockTopSection
static function GetIBlockTopSection($SECTION_ID)
{
	if (is_array($SECTION_ID)) $SECTION_ID = $SECTION_ID[0];
	$dbRes = CIBlockSection::GetNavChain(0, $SECTION_ID);

	$arSection = $dbRes->Fetch(); // hack to check "virtual" root insted of a real one
	$arSection = $dbRes->Fetch();
	if ($arSection)
		return $arSection['ID'];
	else
		return $SECTION_ID;
}