[FIX] website_blog: blog pager page issue

When we are on the page:

 /blog/myblog-1/page/2

the link to page 3 is:

 /blog/myblog-1/page/3

So we need to give /blog/our-blog-1 as source url of pager.

Previously in this instance, since 4faed0b7 the page 3 url
in this scenario would erroneously be:

 /blog/myblog-1/page/2/page/3

opw-688681
This commit is contained in:
Nicolas Lempereur
2016-09-22 08:05:20 +02:00
parent 8b41933a9e
commit e083d720a9
+1 -1
View File
@@ -127,7 +127,7 @@ class WebsiteBlog(http.Controller):
blog_posts = blog_post_obj.browse(cr, uid, blog_post_ids, context=context)
pager = request.website.pager(
url=request.httprequest.path,
url=request.httprequest.path.partition('/page/')[0],
total=len(blog_posts),
page=page,
step=self._blog_post_per_page,