• Не выводится пагинация списка новостей Битрикс?

    nestercom
    @nestercom Автор вопроса
    Часть 2

    <?endif;?>
    		<?if($arParams["DISPLAY_PREVIEW_TEXT"]!="N" && $arItem["PREVIEW_TEXT"]):?>
    			<div class="bx-newslist-content">
    			<?echo $arItem["PREVIEW_TEXT"];?>
    			</div>
    		<?endif;?>
    		<?foreach($arItem["FIELDS"] as $code=>$value):?>
    			<?if($code == "SHOW_COUNTER"):?>
    				<div class="bx-newslist-view"><i class="fa fa-eye"></i> <?=GetMessage("IBLOCK_FIELD_".$code)?>:
    					<?=intval($value);?>
    				</div>
    			<?elseif(
    				$value
    				&& (
    					$code == "SHOW_COUNTER_START"
    					|| $code == "DATE_ACTIVE_FROM"
    					|| $code == "ACTIVE_FROM"
    					|| $code == "DATE_ACTIVE_TO"
    					|| $code == "ACTIVE_TO"
    					|| $code == "DATE_CREATE"
    					|| $code == "TIMESTAMP_X"
    				)
    			):?>
    				<?
    				$value = CIBlockFormatProperties::DateFormat($arParams["ACTIVE_DATE_FORMAT"], MakeTimeStamp($value, CSite::GetDateFormat()));
    				?>
    				<div class="bx-newslist-date"><i class="fa fa-calendar-o"></i> <?=GetMessage("IBLOCK_FIELD_".$code)?>:
    					<?=$value;?>
    				</div>
    			<?elseif($code == "TAGS" && $value):?>
    				<div class="bx-newslist-tags"><i class="fa fa-tag"></i> <?=GetMessage("IBLOCK_FIELD_".$code)?>:
    					<?=$value;?>
    				</div>
    			<?elseif(
    				$value
    				&& (
    					$code == "CREATED_USER_NAME"
    					|| $code == "USER_NAME"
    				)
    			):?>
    				<div class="bx-newslist-author"><i class="fa fa-user"></i> <?=GetMessage("IBLOCK_FIELD_".$code)?>:
    					<?=$value;?>
    				</div>
    			<?elseif ($value != ""):?>
    				<div class="bx-newslist-other"><i class="fa"></i> <?=GetMessage("IBLOCK_FIELD_".$code)?>:
    					<?=$value;?>
    				</div>
    			<?endif;?>
    		<?endforeach;?>
    		<?foreach($arItem["DISPLAY_PROPERTIES"] as $pid=>$arProperty):?>
    			<?
    			if(is_array($arProperty["DISPLAY_VALUE"]))
    				$value = implode("&nbsp;/&nbsp;", $arProperty["DISPLAY_VALUE"]);
    			else
    				$value = $arProperty["DISPLAY_VALUE"];
    			?>
    			<?if($arProperty["CODE"] == "FORUM_MESSAGE_CNT"):?>
    				<div class="bx-newslist-comments"><i class="fa fa-comments"></i> <?=$arProperty["NAME"]?>:
    					<?=$value;?>
    				</div>
    			<?elseif ($value != ""):?>
    				<div class="bx-newslist-other"><i class="fa"></i> <?=$arProperty["NAME"]?>:
    					<?=$value;?>
    				</div>
    			<?endif;?>
    		<?endforeach;?>
    		<div class="row">
    		<?if($arParams["DISPLAY_DATE"]!="N" && $arItem["DISPLAY_ACTIVE_FROM"]):?>
    			<div class="col-xs-5">
    				<div class="bx-newslist-date"><i class="fa fa-calendar-o"></i> <?echo $arItem["DISPLAY_ACTIVE_FROM"]?></div>
    			</div>
    		<?endif?>
    		<?if($arParams["USE_RATING"]=="Y"):?>
    			<div class="col-xs-7 text-right">
    				<?$APPLICATION->IncludeComponent(
    					"bitrix:iblock.vote",
    					"flat",
    					Array(
    						"IBLOCK_TYPE" => $arParams["IBLOCK_TYPE"],
    						"IBLOCK_ID" => $arParams["IBLOCK_ID"],
    						"ELEMENT_ID" => $arItem["ID"],
    						"MAX_VOTE" => $arParams["MAX_VOTE"],
    						"VOTE_NAMES" => $arParams["VOTE_NAMES"],
    						"CACHE_TYPE" => $arParams["CACHE_TYPE"],
    						"CACHE_TIME" => $arParams["CACHE_TIME"],
    						"DISPLAY_AS_RATING" => $arParams["DISPLAY_AS_RATING"],
    						"SHOW_RATING" => "N",
    					),
    					$component
    				);?>
    			</div>
    		<?endif?>
    		</div>
    		<div class="row">
    			<div class="col-xs-5">
    			<?if(!$arParams["HIDE_LINK_WHEN_NO_DETAIL"] || ($arItem["DETAIL_TEXT"] && $arResult["USER_HAVE_ACCESS"])):?>
    				<div class="bx-newslist-more"><a class="btn btn-primary btn-xs" href="<?echo $arItem["DETAIL_PAGE_URL"]?>"><?echo GetMessage("CT_BNL_GOTO_DETAIL")?></a></div>
    			<?endif;?>
    			</div>
    		<?
    		if ($arParams["USE_SHARE"] == "Y")
    		{
    			?>
    			<div class="col-xs-7 text-right">
    				<noindex>
    				<?
    				$APPLICATION->IncludeComponent("bitrix:main.share", $arParams["SHARE_TEMPLATE"], array(
    						"HANDLERS" => $arParams["SHARE_HANDLERS"],
    						"PAGE_URL" => $arItem["~DETAIL_PAGE_URL"],
    						"PAGE_TITLE" => $arItem["~NAME"],
    						"SHORTEN_URL_LOGIN" => $arParams["SHARE_SHORTEN_URL_LOGIN"],
    						"SHORTEN_URL_KEY" => $arParams["SHARE_SHORTEN_URL_KEY"],
    						"HIDE" => $arParams["SHARE_HIDE"],
    					),
    					$component,
    					array("HIDE_ICONS" => "Y")
    				);
    				?>
    				</noindex>
    			</div>
    			<?
    		}
    		?>
    		</div>
    	</div>
    	</div>
    <?endforeach;?>
    </div>
    <?if($arParams["DISPLAY_BOTTOM_PAGER"]):?>
    	<br /><?=$arResult["NAV_STRING"]?>
    <?endif;?>
    </div>
  • Как в Битриксе вывести товары с помощью компонента bitrix:news?

    nestercom
    @nestercom Автор вопроса
    Ярослав Александров, а как в $collectName = $arResult["NAME"]; передать ID товаров у которых PROPERTY_61_VALUE?
  • Как в Битриксе вывести товары с помощью компонента bitrix:news?

    nestercom
    @nestercom Автор вопроса
    Если Вы имеете в виду вот это, то не работает.

    <?$APPLICATION->IncludeComponent(
    "bitrix:news",
    "flat1collection",
    Array(
    "ADD_ELEMENT_CHAIN" => "N",
    "ADD_SECTIONS_CHAIN" => "Y",
    "AJAX_MODE" => "N",
    "AJAX_OPTION_ADDITIONAL" => "",
    "AJAX_OPTION_HISTORY" => "N",
    "AJAX_OPTION_JUMP" => "N",
    "AJAX_OPTION_STYLE" => "Y",
    "BROWSER_TITLE" => "-",
    "CACHE_FILTER" => "N",
    "CACHE_GROUPS" => "Y",
    "CACHE_TIME" => "36000000",
    "CACHE_TYPE" => "A",
    "CATEGORY_CODE" => "CATEGORY",
    "CATEGORY_IBLOCK" => array(0=>"2",),
    "CATEGORY_ITEMS_COUNT" => "5",
    "CATEGORY_THEME_2" => "list",
    "CHECK_DATES" => "Y",
    "COLOR_NEW" => "3E74E6",
    "COLOR_OLD" => "C0C0C0",
    "COMPONENT_TEMPLATE" => "flat1collection",
    "DETAIL_ACTIVE_DATE_FORMAT" => "d.m.Y",
    "DETAIL_DISPLAY_BOTTOM_PAGER" => "Y",
    "DETAIL_DISPLAY_TOP_PAGER" => "N",
    "DETAIL_FIELD_CODE" => array(0=>"",1=>"",),
    "DETAIL_PAGER_SHOW_ALL" => "Y",
    "DETAIL_PAGER_TEMPLATE" => "",
    "DETAIL_PAGER_TITLE" => "Страница",
    "DETAIL_PROPERTY_CODE" => array(0=>"STRANA",1=>"PRIV_TOV",2=>"",),
    "DETAIL_SET_CANONICAL_URL" => "N",
    "DISPLAY_AS_RATING" => "rating",
    "DISPLAY_BOTTOM_PAGER" => "Y",
    "DISPLAY_DATE" => "N",
    "DISPLAY_NAME" => "Y",
    "DISPLAY_PICTURE" => "Y",
    "DISPLAY_PREVIEW_TEXT" => "Y",
    "DISPLAY_TOP_PAGER" => "N",
    "FONT_MAX" => "50",
    "FONT_MIN" => "10",
    "HIDE_LINK_WHEN_NO_DETAIL" => "N",
    "IBLOCK_ID" => "8",
    "IBLOCK_TYPE" => "news",
    "INCLUDE_IBLOCK_INTO_CHAIN" => "Y",
    "LIST_ACTIVE_DATE_FORMAT" => "d.m.Y",
    "LIST_FIELD_CODE" => array(0=>"",1=>"",),
    "LIST_PROPERTY_CODE" => array(0=>"",1=>"",),
    "MEDIA_PROPERTY" => "",
    "MESSAGE_404" => "",
    "META_DESCRIPTION" => "-",
    "META_KEYWORDS" => "-",
    "NEWS_COUNT" => "20",
    "PAGER_BASE_LINK_ENABLE" => "N",
    "PAGER_DESC_NUMBERING" => "N",
    "PAGER_DESC_NUMBERING_CACHE_TIME" => "36000",
    "PAGER_SHOW_ALL" => "N",
    "PAGER_SHOW_ALWAYS" => "N",
    "PAGER_TEMPLATE" => ".default",
    "PAGER_TITLE" => "Коллекции",
    "PERIOD_NEW_TAGS" => "",
    "PREVIEW_TRUNCATE_LEN" => "",
    "SEF_FOLDER" => "/collection/",
    "SEF_MODE" => "Y",
    "SEF_URL_TEMPLATES" => array("news"=>"","section"=>"","detail"=>"#ELEMENT_CODE#/",),
    "SET_LAST_MODIFIED" => "N",
    "SET_STATUS_404" => "N",
    "SET_TITLE" => "Y",
    "SHOW_404" => "N",
    "SLIDER_PROPERTY" => "",
    "SORT_BY1" => "ACTIVE_FROM",
    "SORT_BY2" => "SORT",
    "SORT_ORDER1" => "DESC",
    "SORT_ORDER2" => "ASC",
    "STRICT_SECTION_CHECK" => "N",
    "TAGS_CLOUD_ELEMENTS" => "150",
    "TAGS_CLOUD_WIDTH" => "100%",
    "TEMPLATE_THEME" => "blue",
    "USE_CATEGORIES" => "N",
    "USE_FILTER" => "N",
    "USE_PERMISSIONS" => "N",
    "USE_RATING" => "N",
    "USE_REVIEW" => "N",
    "USE_RSS" => "N",
    "USE_SEARCH" => "N",
    "USE_SHARE" => "N"
    )
    );?>



    <?php
    $collectName = $arResult["NAME"];

    $GLOBALS['arrCollectName'] = array("PROPERTY_61_VALUE"=>$collectName);
    ?>
    <?$APPLICATION->IncludeComponent(
    "bitrix:catalog.section",
    "",
    Array(
    "ACTION_VARIABLE" => "action",
    "ADD_PICT_PROP" => "-",
    "ADD_PROPERTIES_TO_BASKET" => "Y",
    "ADD_SECTIONS_CHAIN" => "N",
    "ADD_TO_BASKET_ACTION" => "ADD",
    "AJAX_MODE" => "N",
    "AJAX_OPTION_ADDITIONAL" => "",
    "AJAX_OPTION_HISTORY" => "N",
    "AJAX_OPTION_JUMP" => "N",
    "AJAX_OPTION_STYLE" => "Y",
    "BACKGROUND_IMAGE" => "-",
    "BASKET_URL" => "/personal/basket.php",
    "BROWSER_TITLE" => "-",
    "CACHE_FILTER" => "N",
    "CACHE_GROUPS" => "Y",
    "CACHE_TIME" => "36000000",
    "CACHE_TYPE" => "A",
    "COMPATIBLE_MODE" => "Y",
    "CONVERT_CURRENCY" => "N",
    "CUSTOM_FILTER" => "{\"CLASS_ID\":\"CondGroup\",\"DATA\":{\"All\":\"AND\",\"True\":\"True\"},\"CHILDREN\":[]}",
    "DETAIL_URL" => "",
    "DISABLE_INIT_JS_IN_COMPONENT" => "N",
    "DISPLAY_BOTTOM_PAGER" => "Y",
    "DISPLAY_COMPARE" => "N",
    "DISPLAY_TOP_PAGER" => "N",
    "ELEMENT_SORT_FIELD" => "sort",
    "ELEMENT_SORT_FIELD2" => "id",
    "ELEMENT_SORT_ORDER" => "asc",
    "ELEMENT_SORT_ORDER2" => "desc",
    "ENLARGE_PRODUCT" => "STRICT",
    "FILTER_NAME" => "arrCollectName",
    "HIDE_NOT_AVAILABLE" => "N",
    "HIDE_NOT_AVAILABLE_OFFERS" => "N",
    "IBLOCK_ID" => "2",
    "IBLOCK_TYPE" => "catalog",
    "INCLUDE_SUBSECTIONS" => "Y",
    "LABEL_PROP" => array(),
    "LAZY_LOAD" => "N",
    "LINE_ELEMENT_COUNT" => "3",
    "LOAD_ON_SCROLL" => "N",
    "MESSAGE_404" => "",
    "MESS_BTN_ADD_TO_BASKET" => "В корзину",
    "MESS_BTN_BUY" => "Купить",
    "MESS_BTN_DETAIL" => "Подробнее",
    "MESS_BTN_SUBSCRIBE" => "Подписаться",
    "MESS_NOT_AVAILABLE" => "Нет в наличии",
    "META_DESCRIPTION" => "-",
    "META_KEYWORDS" => "-",
    "OFFERS_FIELD_CODE" => array("",""),
    "OFFERS_LIMIT" => "5",
    "OFFERS_SORT_FIELD" => "sort",
    "OFFERS_SORT_FIELD2" => "id",
    "OFFERS_SORT_ORDER" => "asc",
    "OFFERS_SORT_ORDER2" => "desc",
    "PAGER_BASE_LINK_ENABLE" => "N",
    "PAGER_DESC_NUMBERING" => "N",
    "PAGER_DESC_NUMBERING_CACHE_TIME" => "36000",
    "PAGER_SHOW_ALL" => "N",
    "PAGER_SHOW_ALWAYS" => "N",
    "PAGER_TEMPLATE" => ".default",
    "PAGER_TITLE" => "Товары",
    "PAGE_ELEMENT_COUNT" => "18",
    "PARTIAL_PRODUCT_PROPERTIES" => "N",
    "PRICE_CODE" => array(),
    "PRICE_VAT_INCLUDE" => "Y",
    "PRODUCT_BLOCKS_ORDER" => "price,props,sku,quantityLimit,quantity,buttons",
    "PRODUCT_DISPLAY_MODE" => "N",
    "PRODUCT_ID_VARIABLE" => "id",
    "PRODUCT_PROPS_VARIABLE" => "prop",
    "PRODUCT_QUANTITY_VARIABLE" => "quantity",
    "PRODUCT_ROW_VARIANTS" => "[{'VARIANT':'2','BIG_DATA':false},{'VARIANT':'2','BIG_DATA':false},{'VARIANT':'2','BIG_DATA':false},{'VARIANT':'2','BIG_DATA':false},{'VARIANT':'2','BIG_DATA':false},{'VARIANT':'2','BIG_DATA':false}]",
    "PRODUCT_SUBSCRIPTION" => "Y",
    "RCM_PROD_ID" => $_REQUEST["PRODUCT_ID"],
    "RCM_TYPE" => "personal",
    "SECTION_CODE" => "",
    "SECTION_ID" => $_REQUEST["SECTION_ID"],
    "SECTION_ID_VARIABLE" => "SECTION_ID",
    "SECTION_URL" => "",
    "SECTION_USER_FIELDS" => array("",""),
    "SEF_MODE" => "N",
    "SET_BROWSER_TITLE" => "Y",
    "SET_LAST_MODIFIED" => "N",
    "SET_META_DESCRIPTION" => "Y",
    "SET_META_KEYWORDS" => "Y",
    "SET_STATUS_404" => "N",
    "SET_TITLE" => "Y",
    "SHOW_404" => "N",
    "SHOW_ALL_WO_SECTION" => "N",
    "SHOW_CLOSE_POPUP" => "N",
    "SHOW_DISCOUNT_PERCENT" => "N",
    "SHOW_FROM_SECTION" => "N",
    "SHOW_MAX_QUANTITY" => "N",
    "SHOW_OLD_PRICE" => "N",
    "SHOW_PRICE_COUNT" => "1",
    "SHOW_SLIDER" => "Y",
    "SLIDER_INTERVAL" => "3000",
    "SLIDER_PROGRESS" => "N",
    "TEMPLATE_THEME" => "blue",
    "USE_ENHANCED_ECOMMERCE" => "N",
    "USE_MAIN_ELEMENT_SECTION" => "N",
    "USE_PRICE_COUNT" => "N",
    "USE_PRODUCT_QUANTITY" => "N"
    )
    );?>
  • Убрать текст "Новости" в Битрикс?

    nestercom
    @nestercom Автор вопроса
    Ярослав Александров, спасибо, уже нашел его в файле sect_bottom.php
  • Убрать текст "Новости" в Битрикс?

    nestercom
    @nestercom Автор вопроса
    Алексей, скрыть то через css можно, но так не правильно делать.