Answer the question
In order to leave comments, you need to log in
How to prohibit the output of certain news in bitrix?
Question to Bitrix connoisseurs, there is a block:
<?
if(isset($_REQUEST['y'])){
$g = $_REQUEST['y'];
global $arrFilter;
$from = "01.01.".$g;
$to = "31.12.".$g;
$arrFilter = Array(
">=DATE_ACTIVE_FROM" => $from,
"<=DATE_ACTIVE_FROM" => $to);
}
?>
<?$APPLICATION->IncludeComponent("bitrix:news.list", "news_new", Array(
"DISPLAY_DATE" => "Y",
"DISPLAY_NAME" => "Y",
"DISPLAY_PICTURE" => "Y",
"DISPLAY_PREVIEW_TEXT" => "Y",
"AJAX_MODE" => "Y",
"IBLOCK_TYPE" => "",
"IBLOCK_ID" => "1",
"NEWS_COUNT" => "8",
"SORT_BY1" => "ACTIVE_FROM",
"SORT_ORDER1" => "DESC",
"SORT_BY2" => "SORT",
"SORT_ORDER2" => "ASC",
"FILTER_NAME" => "arrFilter",
"FIELD_CODE" => Array("ID"),
"PROPERTY_CODE" => Array("DESCRIPTION"),
"CHECK_DATES" => "Y",
"DETAIL_URL" => "",
"PREVIEW_TRUNCATE_LEN" => "250",
"ACTIVE_DATE_FORMAT" => "d.m.Y",
"SET_TITLE" => "Y",
"SET_STATUS_404" => "Y",
"INCLUDE_IBLOCK_INTO_CHAIN" => "N",
"ADD_SECTIONS_CHAIN" => "Y",
"HIDE_LINK_WHEN_NO_DETAIL" => "Y",
"PARENT_SECTION" => "",
"PARENT_SECTION_CODE" => "",
"INCLUDE_SUBSECTIONS" => "Y",
"CACHE_TYPE" => "N",
"CACHE_TIME" => "3600",
"CACHE_FILTER" => "Y",
"CACHE_GROUPS" => "Y",
"DISPLAY_TOP_PAGER" => "Y",
"DISPLAY_BOTTOM_PAGER" => "Y",
"PAGER_TITLE" => "Новости",
"PAGER_SHOW_ALWAYS" => "Y",
"PAGER_TEMPLATE" => "new_orange",
"PAGER_DESC_NUMBERING" => "N",
"PAGER_DESC_NUMBERING_CACHE_TIME" => "36000",
"PAGER_SHOW_ALL" => "N",
"AJAX_OPTION_JUMP" => "N",
"AJAX_OPTION_STYLE" => "Y",
"AJAX_OPTION_HISTORY" => "N",
"AJAX_OPTION_ADDITIONAL" => ""
)
);?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question