comparison MoinMoin/themes/__init__.py @ 2252:ecd43cdbb9b6

breadcrubms now show up titles properly.
author Ashutosh Singla <ashu1461@gmail.com>
date Tue, 27 Aug 2013 19:11:15 +0530
parents 5f2fb2d7ed87
children 46b74c363c6f
comparison
equal deleted inserted replaced
2251:22d1b58d785f 2252:ecd43cdbb9b6
94 if fqname.field != NAME_EXACT: 94 if fqname.field != NAME_EXACT:
95 return [(fqname, fqname, bool(self.storage.get_item(**fqname.query)))] 95 return [(fqname, fqname, bool(self.storage.get_item(**fqname.query)))]
96 namespace = fqname.namespace 96 namespace = fqname.namespace
97 fq_current = CompositeName(u'', NAME_EXACT, namespace) 97 fq_current = CompositeName(u'', NAME_EXACT, namespace)
98 fq_segment = CompositeName(u'', NAME_EXACT, namespace or '~') 98 fq_segment = CompositeName(u'', NAME_EXACT, namespace or '~')
99 breadcrumbs.append((CompositeName(fq_segment, fq_current, False))) 99 breadcrumbs.append((fq_segment, fq_current, False))
100 item_name = fqname.value 100 item_name = fqname.value
101 if not item_name: 101 if not item_name:
102 return breadcrumbs if namespace else [] 102 return breadcrumbs
103 for segment in item_name.split('/'): 103 for segment in item_name.split('/'):
104 current_item += segment 104 current_item += segment
105 fq_current = CompositeName(namespace, NAME_EXACT, current_item) 105 fq_current = CompositeName(namespace, NAME_EXACT, current_item)
106 fq_segment = CompositeName(namespace, NAME_EXACT, segment) 106 fq_segment = CompositeName(namespace, NAME_EXACT, segment)
107 breadcrumbs.append((fq_segment, fq_current, bool(self.storage.get_item(**fq_current.query)))) 107 breadcrumbs.append((fq_segment, fq_current, bool(self.storage.get_item(**fq_current.query))))