comparison 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
comparison
equal deleted inserted replaced
1024:2ae3b6291456 1025:36e5945d064c
175 if show_comments: 175 if show_comments:
176 yield appendComments(self, items, identities, profile) 176 yield appendComments(self, items, identities, profile)
177 177
178 blog_view = self.getPageByName(u'blog_view') 178 blog_view = self.getPageByName(u'blog_view')
179 template_data[u'items'] = data[u'items'] = items 179 template_data[u'items'] = data[u'items'] = items
180 if request.args.get('reverse') == ['1']:
181 template_data[u'items'].items.reverse()
180 template_data[u'item_http_uri'] = items_http_uri = {} 182 template_data[u'item_http_uri'] = items_http_uri = {}
181 template_data[u'tags_http_uri'] = tags_http_uri = {} 183 template_data[u'tags_http_uri'] = tags_http_uri = {}
182 for item in items: 184 for item in items:
183 service_s = service.full() 185 service_s = service.full()
184 items_http_uri[item.id] = self.host.getExtBaseURL(request, blog_view.getURL(service_s, node or '@', u'id', item.id)) 186 items_http_uri[item.id] = self.host.getExtBaseURL(request, blog_view.getURL(service_s, node or '@', u'id', item.id))