106
106
ctx['title_img'] = media_url(req, CorePlugin,
107
107
"images/chrome/root-breadcrumb.png")
109
ctx['ancestry'] = self.get_context_ancestry(req)
109
ancestry = self.get_context_ancestry(req)
113
crumber = Breadcrumber(req)
115
ctx['breadcrumbs'] = []
116
for ancestor in ancestry:
117
crumb = crumber.crumb(ancestor)
121
if hasattr(crumb, 'extra_breadcrumbs_before'):
122
ctx['breadcrumbs'].extend(crumb.extra_breadcrumbs_before)
123
ctx['breadcrumbs'].append(crumb)
124
if hasattr(crumb, 'extra_breadcrumbs_after'):
125
ctx['breadcrumbs'].extend(crumb.extra_breadcrumbs_after)
113
127
# If the view has specified text for a breadcrumb, add one.
114
128
if self.breadcrumb_text:
115
ctx['extra_breadcrumbs'] = [ViewBreadcrumb(req, self)]
117
ctx['extra_breadcrumbs'] = []
129
ctx['breadcrumbs'].append(ViewBreadcrumb(req, self))
119
131
# Allow the view to add its own fake breadcrumbs.
120
ctx['extra_breadcrumbs'] += self.extra_breadcrumbs
132
ctx['breadcrumbs'].extend(self.extra_breadcrumbs)
122
ctx['crumb'] = Breadcrumber(req).crumb
123
134
self.populate_headings(req, ctx)
124
135
tmpl = loader.load(os.path.join(os.path.dirname(__file__),
125
136
'ivle-headings.html'))