@jinja2.contextfunction
@library.global_function
def breadcrumbs(context, items=list(), add_default=True, id=None):
 if add_default:
  first_crumb = u'Home'
  crumbs = [(reverse('home'), _lazy(first_crumb))]
 else:
  crumbs = []
 if items:
  try:
   crumbs += items
  except TypeError:
   crumbs.append(items)
 c = {'breadcrumbs': crumbs, 'id': id}
 return jinja2.Markup(render_to_string('layout/breadcrumbs.html', c))

@ jinja2 . contextfunction @ library . global_function def breadcrumbs ( context , items = list ( ) , add_default = True , id = None ) : if add_default : first_crumb = u'Home' crumbs = [ ( reverse ( 'home' ) , _lazy ( first_crumb ) ) ] else : crumbs = [ ] if items : try : crumbs += items except TypeError : crumbs . append ( items ) c = { 'breadcrumbs' : crumbs , 'id' : id } return jinja2 . Markup ( render_to_string ( 'layout/breadcrumbs.html' , c ) )
create the breadcrumb trail to this page of documentation .