[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
This commit is contained in:
parent
29f5719254
commit
4faed0b792
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue