diff -r 5b75fd66c80e -r d7a270f50f54 web/views/ibreadcrumbs.py --- a/web/views/ibreadcrumbs.py Sun Nov 08 21:53:18 2009 +0100 +++ b/web/views/ibreadcrumbs.py Fri Nov 20 19:35:54 2009 +0100 @@ -30,22 +30,29 @@ title = _('contentnavigation_breadcrumbs') help = _('contentnavigation_breadcrumbs_description') separator = u' > ' + link_template = u'%s' def call(self, view=None, first_separator=True): entity = self.cw_rset.get_entity(0, 0) path = entity.breadcrumbs(view) if path: - self.w(u'') + self.open_breadcrumbs() if first_separator: self.w(self.separator) self.render_breadcrumbs(entity, path) - self.w(u'') + self.close_breadcrumbs() + + def open_breadcrumbs(self): + self.w(u'') + + def close_breadcrumbs(self): + self.w(u'') def render_breadcrumbs(self, contextentity, path): root = path.pop(0) if isinstance(root, Entity): - self.w(u'%s' % (self._cw.build_url(root.__regid__), - root.dc_type('plural'))) + self.w(self.link_template % (self._cw.build_url(root.__regid__), + root.dc_type('plural'))) self.w(self.separator) self.wpath_part(root, contextentity, not path) for i, parent in enumerate(path): @@ -62,7 +69,7 @@ elif isinstance(part, tuple): url, title = part textsize = self._cw.property_value('navigation.short-line-size') - self.w(u'%s' % ( + self.w(self.link_template % ( xml_escape(url), xml_escape(uilib.cut(title, textsize)))) else: textsize = self._cw.property_value('navigation.short-line-size')