Mercurial > libervia-web
diff src/pages/common/blog/page_meta.py @ 1025:36e5945d064c
pages (common/blog): if "reverse=1" is set in URL query, items will be reversed
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 21 Jan 2018 20:50:49 +0100 |
parents | 2ae3b6291456 |
children | 38cfee0eed48 |
line wrap: on
line diff
--- a/src/pages/common/blog/page_meta.py Sun Jan 21 20:23:33 2018 +0100 +++ b/src/pages/common/blog/page_meta.py Sun Jan 21 20:50:49 2018 +0100 @@ -177,6 +177,8 @@ blog_view = self.getPageByName(u'blog_view') template_data[u'items'] = data[u'items'] = items + if request.args.get('reverse') == ['1']: + template_data[u'items'].items.reverse() template_data[u'item_http_uri'] = items_http_uri = {} template_data[u'tags_http_uri'] = tags_http_uri = {} for item in items: