Answer the question
In order to leave comments, you need to log in
How to set up CNC with detailed news view and pagination?
The problem is that I can't set up both pagination and detail view at once. For a detailed view, I enable the CNC in the settings of the bitrix:news component and set #ELEMENT_CODE#/ for the detailed view page and the CNC directory /dir/ . For page-by-page navigation, I change links like /dir/?PAGEN_1=2 to /dir/page-2/ in bitrix:system.pagenavigation and add the corresponding rule in the rule processing settings. As a result, I have this set of rules in urlrewrite.php for /dir/ :
array(
"CONDITION" => "#^/proyekty/page-([0-9]+)/#",
"RULE" => "PAGEN_1=\$1",
"ID" => "",
"PATH" => "/proyekty/index.php",
),
array(
"CONDITION" => "#^/proyekty/((?!page-)(.+))/#",
"RULE" => "ELEMENT_CODE=\$1",
"ID" => "",
"PATH" => "/proyekty/index.php",
),
array(
"CONDITION" => "#^/proyekty/#",
"RULE" => "",
"ID" => "bitrix:news",
"PATH" => "/proyekty/index.php",
),
Answer the question
In order to leave comments, you need to log in
Do not use SEF_MODE. And check what is set in the infoblock settings. In sense what there addresses of pages.
Good afternoon, maybe someone will come in handy. Developed the "CNC pagination" module, just solves this problem, thanks!
Link to the module: https://gorokhov.su/modules/pagen/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question