<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?> <?$this->setFrameMode(false);?> <? $this->setFrameMode(true); // get section items count and subsections $arItemFilter = CAllCorp::GetCurrentSectionElementFilter($arResult["VARIABLES"], $arParams); $arSectionFilter = CAllCorp::GetCurrentSectionFilter($arResult["VARIABLES"], $arParams); $itemsCnt = CCache::CIblockElement_GetList(array("CACHE" => array("TAG" => CCache::GetIBlockCacheTag($arParams["IBLOCK_ID"]))), $arItemFilter, array()); $SectionID = CCache::CIblockSection_GetList(array("CACHE" => array("TAG" => CCache::GetIBlockCacheTag($arParams["IBLOCK_ID"]), "MULTI" => "N", "RESULT" => array("ID"))), $arSectionFilter, false, array("ID"), true); $arSubSectionFilter = CAllCorp::GetCurrentSectionSubSectionFilter($arResult["VARIABLES"], $arParams, $arSectionID); $arSubSections = CCache::CIblockSection_GetList(array("CACHE" => array("TAG" => CCache::GetIBlockCacheTag($arParams["IBLOCK_ID"]), "MULTI" => "Y")), $arSubSectionFilter, false, array("ID")); ?> <?if(!$SectionID):?> <div class="alert alert-warning"><?php echo GetMessage("SECTION_NOTFOUND"); ?> </div> <?else:?> <?if(!$arSubSections && !$itemsCnt):?> <div class="alert alert-warning"><?php echo GetMessage("SECTION_EMPTY"); ?> </div> <?endif;?> <?if($arSubSections):?> <?// sections list?> <?$APPLICATION->IncludeComponent( "bitrix:news.list", "catalog-sections", Array( "PARENT_SECTION" => $arResult["VARIABLES"]["SECTION_ID"],