diff --git a/views/mio/forum/forum.twig b/views/mio/forum/forum.twig index 80e12401..719849d8 100644 --- a/views/mio/forum/forum.twig +++ b/views/mio/forum/forum.twig @@ -3,7 +3,10 @@ {% from '@mio/forum/macros.twig' import forum_category_listing, forum_topic_listing, forum_category_buttons %} {% set title = forum_info.forum_name %} -{% set canonical_url = '/forum/forum.php?f=' ~ forum_info.forum_id %} +{% set canonical_url = '/forum/forum.php'|url_construct({ + 'f': forum_info.forum_id, + 'o': forum_offset, +}) %} {% block content %} {{ navigation(forum_breadcrumbs, forum_breadcrumbs|last, true, null, 'left') }} @@ -14,7 +17,12 @@ {% if forum_info.forum_type == 0 %} {% set fcbuttons = app.hasActiveSession ? forum_category_buttons(forum_info) : '' %} - {% set fcpagination = pagination(forum_info.forum_topic_count, forum_range, forum_offset, canonical_url, 'forum__') %} + {% set fcpagination = pagination( + forum_info.forum_topic_count, + forum_range, + forum_offset, + '/forum/forum.php'|url_construct({'f': forum_info.forum_id}), 'forum__' + ) %} {{ fcbuttons }} {{ fcpagination }} diff --git a/views/mio/forum/topic.twig b/views/mio/forum/topic.twig index 2f642401..1e7bc290 100644 --- a/views/mio/forum/topic.twig +++ b/views/mio/forum/topic.twig @@ -10,12 +10,20 @@ %} {% set title = topic_info.topic_title %} -{% set base_url = '/forum/topic.php?t=' ~ topic_info.topic_id %} -{% set canonical_url = base_url %} +{% set canonical_url = '/forum/topic.php'|url_construct({ + 't': topic_info.topic_id, + 'o': topic_offset, +}) %} {% set can_reply = app.hasActiveSession and topic_info.topic_locked is null and not topic_info.topic_archived %} {% set ftbuttons = can_reply ? forum_topic_buttons(topic_info) : '' %} -{% set ftpagination = pagination(topic_info.topic_post_count, topic_range, topic_offset, base_url, 'forum__') %} +{% set ftpagination = pagination( + topic_info.topic_post_count, + topic_range, + topic_offset, + '/forum/topic.php'|url_construct({'t': topic_info.topic_id}), + 'forum__' +) %} {% block content %} {{ navigation(topic_breadcrumbs, topic_breadcrumbs|last, true, null, 'left') }} diff --git a/views/mio/news/category.twig b/views/mio/news/category.twig index 1f7a5779..13ea086d 100644 --- a/views/mio/news/category.twig +++ b/views/mio/news/category.twig @@ -3,7 +3,10 @@ {% from '@mio/news/macros.twig' import news_preview %} {% set title = category.category_name ~ ' :: News' %} -{% set canonical_url = '/news.php?c=' ~ category.category_id ~ (posts_offset > 0 ? '&o=' ~ posts_offset : '') %} +{% set canonical_url = '/news.php'|url_construct({ + 'c': category.category_id, + 'o': posts_offset, +}) %} {% block news_content %}