@jinja2.contextfunction
@library.global_function
def breadcrumbs(context, items=list(), add_default=True, id=None):
    """
    Show a list of breadcrumbs. If url is None, it won't be a link.
    Accepts: [(url, label)]
    """
    if add_default:
        first_crumb = u'Home'

        crumbs = [(reverse('home'), _lazy(first_crumb))]
    else:
        crumbs = []

    # add user-defined breadcrumbs
    if items:
        try:
            crumbs += items
        except __HOLE__:
            crumbs.append(items)

    c = {'breadcrumbs': crumbs, 'id': id}

    return jinja2.Markup(render_to_string('layout/breadcrumbs.html', c))
dataset/ETHPy150Open mozilla/kitsune/kitsune/sumo/templatetags/jinja_helpers.py/breadcrumbs