<?$ElementID = $APPLICATION->IncludeComponent(
"bitrix:news.detail",
"",
Array(
"DISPLAY_DATE" => $arParams["DISPLAY_DATE"],
"DISPLAY_NAME" => $arParams["DISPLAY_NAME"],
"DISPLAY_PICTURE" => $arParams["DISPLAY_PICTURE"],
"DISPLAY_PREVIEW_TEXT" => $arParams["DISPLAY_PREVIEW_TEXT"],
"IBLOCK_TYPE" => $arParams["IBLOCK_TYPE"],
"IBLOCK_ID" => $arParams["IBLOCK_ID"],
"ELEMENT_ID" => $arResult["VARIABLES"]["ELEMENT_ID"],
"FIELD_CODE" => $arParams["DETAIL_FIELD_CODE"],
"PROPERTY_CODE" => $arParams["DETAIL_PROPERTY_CODE"],
"IBLOCK_URL" => $arResult["FOLDER"].$arResult["URL_TEMPLATES"]["news"],
"META_KEYWORDS" => $arParams["META_KEYWORDS"],
"META_DESCRIPTION" => $arParams["META_DESCRIPTION"],
"DISPLAY_PANEL" => $arParams["DISPLAY_PANEL"],
"SET_TITLE" => $arParams["SET_TITLE"],
"INCLUDE_IBLOCK_INTO_CHAIN" => $arParams["INCLUDE_IBLOCK_INTO_CHAIN"],
"ADD_SECTIONS_CHAIN" => $arParams["ADD_SECTIONS_CHAIN"],
"ACTIVE_DATE_FORMAT" => $arParams["DETAIL_ACTIVE_DATE_FORMAT"],
"CACHE_TYPE" => $arParams["CACHE_TYPE"],
"CACHE_TIME" => $arParams["CACHE_TIME"],
"USE_PERMISSIONS" => $arParams["USE_PERMISSIONS"],
"GROUP_PERMISSIONS" => $arParams["GROUP_PERMISSIONS"],
"DISPLAY_TOP_PAGER" => $arParams["DETAIL_DISPLAY_TOP_PAGER"],
"DISPLAY_BOTTOM_PAGER" => $arParams["DETAIL_DISPLAY_BOTTOM_PAGER"],
"PAGER_TITLE" => $arParams["DETAIL_PAGER_TITLE"],
"PAGER_SHOW_ALWAYS" => "N",
"PAGER_TEMPLATE" => $arParams["DETAIL_PAGER_TEMPLATE"],
),
$component
);?>
<p><a href="<?=$arResult["FOLDER"].$arResult["URL_TEMPLATES"]["news"]?>"><?=GetMessage("T_NEWS_DETAIL_BACK")?></a></p>
<?if($arParams["USE_RATING"]=="Y" && $ElementID):?>
<?$APPLICATION->IncludeComponent(
"bitrix:iblock.vote",
"",
Array(
"IBLOCK_TYPE" => $arParams["IBLOCK_TYPE"],
"IBLOCK_ID" => $arParams["IBLOCK_ID"],
"ELEMENT_ID" => $ElementID,
"MAX_VOTE" => $arParams["MAX_VOTE"],
"VOTE_NAMES" => $arParams["VOTE_NAMES"],
"CACHE_TYPE" => $arParams["CACHE_TYPE"],
"CACHE_TIME" => $arParams["CACHE_TIME"],
),
$component
);?>
<?endif?>
<?if($arParams["USE_CATEGORIES"]=="Y" && $ElementID):
global $arCategoryFilter;
$obCache = new CPHPCache;
$strCacheID = $componentPath.LANG.$arParams["IBLOCK_ID"].$ElementID.$arParams["CATEGORY_CODE"];
if($arParams["CACHE_TYPE"] == "N" || $arParams["CACHE_TYPE"] == "A" && COption::GetOptionString("main", "component_cache_on", "Y") == "N")
$CACHE_TIME = 0;
else
$CACHE_TIME = $arParams["CACHE_TIME"];
if($obCache->StartDataCache($CACHE_TIME, $strCacheID, $componentPath))
{
$rsProperties = CIBlockElement::GetProperty($arParams["IBLOCK_ID"], $ElementID, "sort", "asc", array("ACTIVE"=>"Y","CODE"=>$arParams["CATEGORY_CODE"]));
$arCategoryFilter = array();
while($arProperty = $rsProperties->Fetch())
{
if(is_array($arProperty["VALUE"]) && count($arProperty["VALUE"])>0)
{
foreach($arProperty["VALUE"] as $value)
$arCategoryFilter[$value]=true;
}
elseif(!is_array($arProperty["VALUE"]) && strlen($arProperty["VALUE"])>0)
$arCategoryFilter[$arProperty["VALUE"]]=true;
}
$obCache->EndDataCache($arCategoryFilter);
}
else
{
$arCategoryFilter = $obCache->GetVars();
}
if(count($arCategoryFilter)>0):
$arCategoryFilter = array(
"PROPERTY_".$arParams["CATEGORY_CODE"] => array_keys($arCategoryFilter),
"!"."ID" => $ElementID,
);
?>
<hr /><h3><?=GetMessage("CATEGORIES")?></h3>
<?foreach($arParams["CAT |