comparison libervia/pages/u/page_meta.py @ 1171:469d0de8da0e

pages (blog, u): added atom feed link in "links" template data.
author Goffi <goffi@goffi.org>
date Fri, 26 Apr 2019 08:42:27 +0200
parents 4e716967893a
children 67ec22356457
comparison
equal deleted inserted replaced
1170:4648a333b33f 1171:469d0de8da0e
28 "asyncGetParamA", "JabberID", "Connection", "value", profile_key=target_profile 28 "asyncGetParamA", "JabberID", "Connection", "value", profile_key=target_profile
29 ) 29 )
30 target_jid = jid.JID(target_jid) 30 target_jid = jid.JID(target_jid)
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
34 # add the link to the page
35 atom_url = self.getSubPageURL(request, u'user_blog_feed_atom')
36 request.template_data.setdefault(u'links', []).append({
37 u"href": atom_url,
38 u"type": "application/atom+xml",
39 u"rel": "alternate",
40 u"title": "{target_profile}'s blog".format(target_profile=target_profile)})
41
33 42
34 @defer.inlineCallbacks 43 @defer.inlineCallbacks
35 def prepare_render(self, request): 44 def prepare_render(self, request):
36 data = self.getRData(request) 45 data = self.getRData(request)
37 self.checkCache( 46 self.checkCache(