Здравствуйте! Никак не могу понять, почему не подключается пагинация к моему шаблону.
Сделал шаблон компонента news, news.list, news.detail, всё ок, всё работает. Встала задача прикрутить к news.list пагинацию.
Стандартный шаблон bitrix:news.list прекрасно выводит навигацию. Насколько я понял, формируется она в component.php
Код
...
$arResult["NAV_STRING"] = $rsElement->GetPageNavStringEx(
$navComponentObject,
$arParams["PAGER_TITLE"],
$arParams["PAGER_TEMPLATE"],
$arParams["PAGER_SHOW_ALWAYS"],
$this,
$navComponentParameters
);
И выводится пагинация в шаблоне таким нехитрым образом:
<?if($arParams["DISPLAY_TOP_PAGER"]):?>
<?=$arResult["NAV_STRING"]?><br />
<?endif;?>
В моем шаблоне компонента данный способ совершенно не работает, элемент ["NAV_STRING"] приходит пустой. Битый час не могу понять в чем дело, кеш отключен, чистится.
Вот как я вызываю мой или стандартный компонент (если заменить мой шаблон "portfolio" на ".default" - все прекрасно работает
$APPLICATION->IncludeComponent(
"bitrix:news",
"portfolio",
Array(
"ADD_ELEMENT_CHAIN" => "N",
"ADD_SECTIONS_CHAIN" => "N",
"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",
"CHECK_DATES" => "Y",
"DETAIL_ACTIVE_DATE_FORMAT" => "d.m.Y",
"DETAIL_DISPLAY_BOTTOM_PAGER" => "Y",
"DETAIL_DISPLAY_TOP_PAGER" => "N",
"DETAIL_FIELD_CODE" => array("",""),
"DETAIL_PAGER_SHOW_ALL" => "Y",
"DETAIL_PAGER_TEMPLATE" => "",
"DETAIL_PAGER_TITLE" => "Страница",
"DETAIL_PROPERTY_CODE" => array("price",""),
"DETAIL_SET_CANONICAL_URL" => "N",
"DISPLAY_BOTTOM_PAGER" => "Y",
"DISPLAY_DATE" => "Y",
"DISPLAY_NAME" => "Y",
"DISPLAY_PICTURE" => "Y",
"DISPLAY_PREVIEW_TEXT" => "Y",
"DISPLAY_TOP_PAGER" => "N",
"HIDE_LINK_WHEN_NO_DETAIL" => "N",
"IBLOCK_ID" => "33",
"IBLOCK_TYPE" => "aspro_scorp_content",
"INCLUDE_IBLOCK_INTO_CHAIN" => "N",
"LIST_ACTIVE_DATE_FORMAT" => "d.m.Y",
"LIST_FIELD_CODE" => array("",""),
"LIST_PROPERTY_CODE" => array("PRICE","STAGES", "BEFOREAFTER", "DATE", "AREA"),
"FIELD_CODE" => [
"DETAIL_TEXT"
],
"MESSAGE_404" => "",
"META_DESCRIPTION" => "-",
"META_KEYWORDS" => "-",
"NEWS_COUNT" => "1",
"PAGER_BASE_LINK_ENABLE" => "N",
"PAGER_DESC_NUMBERING" => "N",
"PAGER_DESC_NUMBERING_CACHE_TIME" => "0",
"PAGER_SHOW_ALL" => "Y",
"PAGER_SHOW_ALWAYS" => "Y",
"PAGER_TEMPLATE" => ".default",
"PAGER_TITLE" => "Новости",
"PREVIEW_TRUNCATE_LEN" => "",
"SEF_FOLDER" => "/portfolio/",
"SEF_MODE" => "Y",
"SEF_URL_TEMPLATES" => Array("detail"=>"#ELEMENT_CODE#/","news"=>"","section"=>""),
"SET_LAST_MODIFIED" => "N",
"SET_STATUS_404" => "N",
"SET_TITLE" => "Y",
"SHOW_404" => "N",
"SORT_BY1" => "ACTIVE_FROM",
"SORT_BY2" => "SORT",
"SORT_ORDER1" => "DESC",
"SORT_ORDER2" => "ASC",
"STRICT_SECTION_CHECK" => "N",
"USE_CATEGORIES" => "N",
"USE_FILTER" => "N",
"USE_PERMISSIONS" => "N",
"USE_RATING" => "N",
"USE_REVIEW" => "N",
"USE_RSS" => "N",
"USE_SEARCH" => "N",
"USE_SHARE" => "N"
));