Forum categories

Пагинация в мультистраницах. ошибка 404

в вызове cot_pagenav() для мульти страниц (page модуль) не передаётся параметр категории c=


webitproff
webitproff • 2026-02-20 00:00 #1

Пагинация в мультистраницах.

в вызове cot_pagenav() для страниц (page модуль) не передаётся параметр категории c= 
зз-за этого пагинация генерирует ссылки вида

/page/?id=123&pg=1

или

/page/?al=moj-alias&pg=2

без c=catcode, роутер Cotonti не понимает, из какой категории страница, и выдаёт 404.


нет категори. получаем 404.
старую строку
$pn = cot_pagenav('page', (empty($al) ? 'id='.$id : 'al='.$al), $pag['page_tab'], $pag['page_totaltabs'], 1, 'pg');
заменить на
$pn = cot_pagenav('page', 'c='.$pag['page_cat'].(empty($al) ? '&id='.$id : '&al='.$al), $pag['page_tab'], $pag['page_totaltabs'], 1, 'pg');

 

демо после фикса

 

🗿

🧙‍♂️ Well met, good traveler! Fate has guided your steps to our humble realm. Here, wise sages and masters of the coding craft ⚒️📜 gather to unravel the mysteries of the code ✨⚙️, share their knowledge, and add new chapters to our chronicles.
⬅️ To the left lie ancient scrolls 📚 filled with forgotten wisdom. ⬆️ Straight ahead, friendly folk offer counsel 💬 to those in need. ➡️ To the right, you may become a chronicler ✍️ yourself, sharing your craft and leaving words of wisdom for those yet to come.
📝 Delay no longer—tell us the name by which you are known, complete the rite of registration 🛡️, and join our fellowship!
🏰 Our brotherhood holds no secret initiation, yet many halls remain closed to wandering guests, for some knowledge 💎 is reserved for those who choose to walk this path beside us.