Back to index

plone3  3.1.7
aboveInThread.py
Go to the documentation of this file.
00001 ##parameters=
00002 ##title=Discussion parent breadcrumbs
00003 ##
00004 from Products.CMFDefault.utils import decode
00005 
00006 breadcrumbs = ''
00007 parents = context.parentsInThread()
00008 
00009 if parents:
00010     breadcrumbs = 'Above in thread: '
00011     for parent in parents:
00012         p_str = '<a href="%s">%s</a>' % (parent.absolute_url(), parent.Title())
00013         breadcrumbs = breadcrumbs + p_str + ':'
00014 
00015     breadcrumbs = breadcrumbs[:-1] + '<p>'
00016 
00017 return decode(breadcrumbs, script)