| Current Path : /var/www/homesaver/www/local/templates/aspro_next/components/bitrix/news/services/ |
| Current File : /var/www/homesaver/www/local/templates/aspro_next/components/bitrix/news/services/section.php |
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
<?$this->setFrameMode(true);?>
<?
// get section items count and subsections
$arSectionFilter = CNext::GetCurrentSectionFilter($arResult["VARIABLES"], $arParams);
$arSection = CNextCache::CIblockSection_GetList(array("CACHE" => array("TAG" => CNextCache::GetIBlockCacheTag($arParams["IBLOCK_ID"]), "CACHE_GROUP" => array($arParams["CACHE_GROUPS"]==="N"? false: $USER->GetGroups()), "MULTI" => "N")), $arSectionFilter, false, array('ID', 'DESCRIPTION', 'PICTURE', 'DETAIL_PICTURE', 'IBLOCK_ID', 'UF_TOP_SEO'));
$arItemFilter = CNext::GetCurrentSectionElementFilter($arResult["VARIABLES"], $arParams);
if($arSection && !$arItemFilter['SECTION_ID'])
{
$arItemFilter['SECTION_ID'] = $arSection['ID'];
}
$itemsCnt = CNextCache::CIblockElement_GetList(array("CACHE" => array("TAG" => CNextCache::GetIBlockCacheTag($arParams["IBLOCK_ID"]), "CACHE_GROUP" => array($arParams["CACHE_GROUPS"]==="N"? false: $USER->GetGroups()))), $arItemFilter, array());
CNext::AddMeta(
array(
'og:description' => $arSection['DESCRIPTION'],
'og:image' => (($arSection['PICTURE'] || $arSection['DETAIL_PICTURE']) ? CFile::GetPath(($arSection['PICTURE'] ? $arSection['PICTURE'] : $arSection['DETAIL_PICTURE'])) : false),
)
);
$arSubSectionFilter = CNext::GetCurrentSectionSubSectionFilter($arResult["VARIABLES"], $arParams, $arSection['ID']);
$arSubSections = CNextCache::CIblockSection_GetList(array("CACHE" => array("TAG" => CNextCache::GetIBlockCacheTag($arParams["IBLOCK_ID"]), "MULTI" => "Y")), $arSubSectionFilter, false, array("ID", "DEPTH_LEVEL"));
?>
<?if(!$arSection && $arParams['SET_STATUS_404'] !== 'Y'):?>
<div class="alert alert-warning"><?=GetMessage("SECTION_NOTFOUND")?></div>
<?elseif(!$arSection && $arParams['SET_STATUS_404'] === 'Y'):?>
<?CNext::goto404Page();?>
<?else:?>
<?// rss
if($arParams['USE_RSS'] !== 'N'){
CNext::ShowRSSIcon(CComponentEngine::makePathFromTemplate($arResult['FOLDER'].$arResult['URL_TEMPLATES']['rss_section'], array_map('urlencode', $arResult['VARIABLES'])));
}?>
<?if(!$arSubSections && !$itemsCnt):?>
<div class="alert alert-warning"><?=GetMessage("SECTION_EMPTY")?></div>
<?endif;?>
<div class="main-section-wrapper">
<?if($arSection['UF_TOP_SEO'] && strpos($_SERVER['REQUEST_URI'], 'PAGEN') === false):?>
<div class="text_before_items">
<p class="introtext"><?=$arSection['UF_TOP_SEO'];?></p>
</div>
<?endif;?>
<?if($arSubSections):?>
<?// sections list?>
<?@include_once('page_blocks/'.$arParams["SECTION_TYPE_VIEW"].'.php');?>
<?endif;?>
<?// section elements?>
<?@include_once('page_blocks/'.$arParams["SECTION_ELEMENTS_TYPE_VIEW"].'.php');?>
<?if($arSection['DESCRIPTION'] && strpos($_SERVER['REQUEST_URI'], 'PAGEN') === false):?>
<div class="text_after_items">
<?=$arSection['DESCRIPTION'];?>
</div>
<?endif;?>
</div>
<?endif;?>