def talkbackURL(self, item): # XXX This is (sadly) CMF-DiscussionItem-specific :(. comment = item.getObject() if not hasattr(comment, 'parentsInThread'): return comment.absolute_url() parent_comments = comment.parentsInThread() commented_object = parent_comments[0] weblog_content = self.getWeblogContentObject() base_url = getArchiveURLFor(commented_object, weblog_content) return '%s#%s' % (base_url, item.id)
def getArchiveURLFor(self, obj): """See IWeblogView. """ weblog_content = obj.getWeblogContentObject() return getArchiveURLFor(obj, weblog_content)