Skip to content
Snippets Groups Projects
Commit 4faed0b7 authored by Jairo Llopis's avatar Jairo Llopis Committed by Jeremy Kersten
Browse files

[FIX] website_blog: fix pager when existing filters in url

Go to a URL such as `/blog/our-news-1?date_begin=2015-01-01`
Now click on page 2.

Without this patch you will go to `/blog/our-news-1?date_begin=2015-01-01/page/2`.
With this patch, you will go to `/blog/our-news-1/page/2?date_begin=2015-01-01`.

This commit closes #13206
parent 29f57192
No related branches found
No related tags found
No related merge requests found
......@@ -127,10 +127,11 @@ class WebsiteBlog(http.Controller):
blog_posts = blog_post_obj.browse(cr, uid, blog_post_ids, context=context)
pager = request.website.pager(
url=blog_url(),
url=request.httprequest.path,
total=len(blog_posts),
page=page,
step=self._blog_post_per_page,
url_args=opt,
)
pager_begin = (page - 1) * self._blog_post_per_page
pager_end = page * self._blog_post_per_page
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment