Answer the question
In order to leave comments, you need to log in
How to remove fixation of last page number in navigation?
The situation is this. The list of elements from the infoblock is obtained (using the - method CIBlockElement::GetList
). The query results ( class object CIBlockResult
) contain a parameter NavPageNomer
(current page number), the page number is not explicitly specified (when querying elements). After clicking on links like /page/?PAGEN_1=<номер страницы>
, the elements change - all the rules. When you go to /page/
, the first page should load, BUT in the results ( NavPageNomer
) the last one requested with PAGEN_1
. What could be the problem?
PS
1) the navigation number is correct
2) caching has nothing to do with it, the /page/
LAST requested one opens
3) the version of Bitrix, the component - does not play a role (there is a similar site where the same design works correctly)
4) PAGEN_1
is not defined on/page/
Answer the question
In order to leave comments, you need to log in
<?
// Пример запрещает сохранение в сессии номера последней страницы
// при стандартной постраничной навигации.
// По умолчанию в сессии запоминается последняя открытая страница постраничной навигации.
// Если вы хотите изменить такое поведение для данной текущей страницы,
// то до вызова метода CDBResult::NavPrint необходимо воспользоваться следующим кодом:
CPageOption::SetOptionString("main", "nav_page_in_session", "N");
// Для того чтобы вернуть режим по умолчанию:
CPageOption::SetOptionString("main", "nav_page_in_session", "Y");
?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question