comparison libervia/pages/u/page_meta.py @ 1207:67ec22356457

pages (blog/view, u): added atom feed URL to "atom_url" in template
author Goffi <goffi@goffi.org>
date Fri, 19 Jul 2019 18:01:25 +0200
parents 469d0de8da0e
children b2d067339de3
comparison
equal deleted inserted replaced
1206:d2e2bf14f2e2 1207:67ec22356457
31 data[u"service"] = target_jid 31 data[u"service"] = target_jid
32 32
33 # if URL is parsed here, we'll have atom.xml available and we need to 33 # if URL is parsed here, we'll have atom.xml available and we need to
34 # add the link to the page 34 # add the link to the page
35 atom_url = self.getSubPageURL(request, u'user_blog_feed_atom') 35 atom_url = self.getSubPageURL(request, u'user_blog_feed_atom')
36 request.template_data[u'atom_url'] = atom_url
36 request.template_data.setdefault(u'links', []).append({ 37 request.template_data.setdefault(u'links', []).append({
37 u"href": atom_url, 38 u"href": atom_url,
38 u"type": "application/atom+xml", 39 u"type": "application/atom+xml",
39 u"rel": "alternate", 40 u"rel": "alternate",
40 u"title": "{target_profile}'s blog".format(target_profile=target_profile)}) 41 u"title": "{target_profile}'s blog".format(target_profile=target_profile)})