A logic heavy function for automagically creating a breadcrumb.

    It uses the dashboard, panel group(if it exists), then current panel.
    Can also use a "custom_breadcrumb" context item to add extra items.
963867
def breadcrumb_nav(context):
    
    breadcrumb = []
    dashboard = context.request.horizon['dashboard']
    try:
        panel_groups = dashboard.get_panel_groups()
    except KeyError:
        panel_groups = None
    panel_group = None
    panel = context.request.horizon['panel']

    # Add panel group, if there is one
    if panel_groups:
        for group in panel_groups.values():
            if panel.slug in group.panels and group.slug != 'default':
                panel_group = group
                break

    # Remove panel reference if that is the current page
    if panel.get_absolute_url() == context.request.path:
        panel = None

    # Get custom breadcrumb, if there is one.
    custom_breadcrumb = context.get('custom_breadcrumb')

    # Build list of tuples (name, optional url)
    breadcrumb.append((dashboard.name, None))
    if panel_group:
        breadcrumb.append((panel_group.name, None))
    if panel:
        breadcrumb.append((panel.name, panel.get_absolute_url()))
    if custom_breadcrumb:
        breadcrumb.extend(custom_breadcrumb)
    breadcrumb.append((context.get('page_title'), None))

    return {'breadcrumb': breadcrumb}
705699
function genRoute(path, breadcrumbName, baseComponent, parentPath) {
  return {
    path,
    exact: true,
    baseComponent,
    breadcrumbName,
    parentPath
  }
}
1347744
function getCrumbTrail( crumbs )
{
	var xhtml = DISPLAY_PREPREND;

	for( var i = 0; i < crumbs.length; i++ )
	{
		xhtml += '<a href="' + crumbs[i][1] + '" >';
		xhtml += unescape( crumbs[i][0] ) + '</a>';
		if( i != (crumbs.length-1) )
		{
			xhtml += DISPLAY_SEPARATOR;
		}
	}

	xhtml += DISPLAY_POSTPREND;

	return xhtml;
}
1185921
private function createBreadcrumbItems()
    {
        $itemClass = $this->getOption('itemClass', null);
        $itemActiveClass = $this->getOption('itemActiveClass', 'active');
        $linkClass = $this->getOption('linkClass', null);

        $items = array();

        foreach ($this->breadcrumbBag->getBreadcrumbs() as $breadcrumb) {
            if ($breadcrumb->isActive()) {
                $items[] = $this->createListItem($itemActiveClass, $breadcrumb->getName());
            } else {
                $items[] = $this->createListItem($itemClass, $this->renderLink($breadcrumb->getName(), $breadcrumb->getLink(), $linkClass));
            }
        }

        return $items;
    }
1231102
public void setupBreadCrumbBar() {
    String[] stringArr = model.getDisplayedCategory().getBreadcrumb().split(BREADCRUMB_DELIMITER);
    Category[] categories = new Category[stringArr.length];

    // Collecting all parent categories from the displayed category using the breadcrumb.
    // There will always be at least one category which will be added to the breadcrumb.
    categories[0] = searchCategory(stringArr[0]);

    // If there are more than one category in the stringArr[], they will be added. For this reason
    // the Integer in the loop starts with one, thus only the second element in the array is needed.
    for (int i = 1; i < stringArr.length; ++i) {
      stringArr[i] = stringArr[i - 1] + BREADCRUMB_DELIMITER + stringArr[i];
      categories[i] = searchCategory(stringArr[i]);
    }

    breadCrumbView.breadcrumbsItm = BreadCrumbBar.buildTreeModel(categories);
    breadCrumbView.breadCrumbBar.setSelectedCrumb(breadCrumbView.breadcrumbsItm);
  }
245000
def breadcrumbs
      return unless show_breadcrumbs?

      content_for(
        :breadcrumbs,
        content_tag(:ol, class: "breadcrumb") do
          concat(content_tag(:li, link_to("Home", root_path)))

          if can_view_resource_index?
            concat(
              content_tag(
                :li, controller_link
              )
            )
          end
        end
      )
    end
554693
def breadcrumb(*args)
      @breadcrumbs ||= []

      args.each_slice(2).map do |pair|
        crumb       = Outpost::Breadcrumb.new
        crumb.title = pair[0]
        crumb.link  = pair[1]

        @breadcrumbs.push crumb
      end
    end
475792
protected function setBreadcrumbEditZone()
    {
        $breadcrumbs = array();

        $breadcrumbs[] = array(
            'url' => $this->url('admin'),
            'text' => $this->text('Dashboard')
        );

        $breadcrumbs[] = array(
            'text' => $this->text('Zones'),
            'url' => $this->url('admin/settings/zone')
        );

        $this->setBreadcrumbs($breadcrumbs);
    }
186991
def handle_page_crumb(func):
    
    @wraps(func)
    def wrapper(path, model, page, root_name):
        path = PAGE_REGEXP.sub('', path)
        breadcrumbs = func(path, model, root_name)
        if page:
            if page.number > 1:
                breadcrumbs[-1].url = path
                page_crumb = Crumb(_('Page %s') % page.number)
                breadcrumbs.append(page_crumb)
        return breadcrumbs
    return wrapper
893356
protected function registerBreadcrumb()
    {
        BreadcrumbFacade::make(
            'admin.dashboard',
            function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('avored-framework::breadcrumb.dashboard');
            }
        );

        BreadcrumbFacade::make(
            'admin.page.index',
            function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Page')
                    ->parent('admin.dashboard');
            }
        );

        BreadcrumbFacade::make(
            'admin.page.create',
            function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Create')
                    ->parent('admin.dashboard')
                    ->parent('admin.page.index');
            }
        );
        BreadcrumbFacade::make(
            'admin.page.edit',
            function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Edit')
                    ->parent('admin.dashboard')
                    ->parent('admin.page.index');
            }
        );
        BreadcrumbFacade::make(
            'admin.page.show',
            function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Show')
                    ->parent('admin.dashboard')
                    ->parent('admin.page.index');
            }
        );

        BreadcrumbFacade::make(
            'admin.menu.index',
            function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Menu')
                    ->parent('admin.dashboard');
            }
        );

        BreadcrumbFacade::make(
            'admin.category.index',
            function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Category')
                    ->parent('admin.dashboard');
            }
        );

        BreadcrumbFacade::make(
            'admin.category.create',
            function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Create')
                    ->parent('admin.dashboard')
                    ->parent('admin.category.index');
            }
        );

        BreadcrumbFacade::make(
            'admin.category.edit',
            function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Edit')
                    ->parent('admin.dashboard')
                    ->parent('admin.category.index');
            }
        );
        BreadcrumbFacade::make(
            'admin.category.show',
            function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Show')
                    ->parent('admin.dashboard')
                    ->parent('admin.category.index');
            }
        );
        BreadcrumbFacade::make(
            'admin.product.index',
            function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Product')
                    ->parent('admin.dashboard');
            }
        );

        BreadcrumbFacade::make(
            'admin.product.create',
            function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Create')
                    ->parent('admin.dashboard')
                    ->parent('admin.product.index');
            }
        );

        BreadcrumbFacade::make(
            'admin.product.edit', function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Edit')
                    ->parent('admin.dashboard')
                    ->parent('admin.product.index');
            }
        );

        BreadcrumbFacade::make(
            'admin.product.show', function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Show')
                    ->parent('admin.dashboard')
                    ->parent('admin.product.index');
            }
        );
        BreadcrumbFacade::make(
            'admin.order.index', function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Order')
                    ->parent('admin.dashboard');
            }
        );

        BreadcrumbFacade::make(
            'admin.order.view', function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('View')
                    ->parent('admin.dashboard')
                    ->parent('admin.order.index');
            }
        );
        BreadcrumbFacade::make(
            'admin.order-status.index', function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Order Status')
                    ->parent('admin.dashboard');
            }
        );

        BreadcrumbFacade::make(
            'admin.order-status.create', function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Create')
                    ->parent('admin.dashboard')
                    ->parent('admin.order-status.index');
            }
        );

        BreadcrumbFacade::make(
            'admin.order-status.edit', function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Edit')
                    ->parent('admin.dashboard')
                    ->parent('admin.order-status.index');
            }
        );
        BreadcrumbFacade::make(
            'admin.order-status.show', function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Show')
                    ->parent('admin.dashboard')
                    ->parent('admin.order-status.index');
            }
        );

        BreadcrumbFacade::make(
            'admin.attribute.index', function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Attribute')
                    ->parent('admin.dashboard');
            }
        );

        BreadcrumbFacade::make(
            'admin.attribute.create', function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Create')
                    ->parent('admin.dashboard')
                    ->parent('admin.attribute.index');
            }
        );

        BreadcrumbFacade::make(
            'admin.attribute.edit', function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Edit')
                    ->parent('admin.dashboard')
                    ->parent('admin.attribute.index');
            }
        );
        BreadcrumbFacade::make(
            'admin.attribute.show', function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Show')
                    ->parent('admin.dashboard')
                    ->parent('admin.attribute.index');
            }
        );
        BreadcrumbFacade::make(
            'admin.property.index', function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Property')
                    ->parent('admin.dashboard');
            }
        );

        BreadcrumbFacade::make(
            'admin.property.create', function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Create')
                    ->parent('admin.dashboard')
                    ->parent('admin.property.index');
            }
        );
        BreadcrumbFacade::make(
            'admin.property.edit', function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Edit')
                    ->parent('admin.dashboard')
                    ->parent('admin.property.index');
            }
        );
        BreadcrumbFacade::make(
            'admin.property.show', function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Create')
                    ->parent('admin.dashboard')
                    ->parent('admin.property.index');
            }
        );
        BreadcrumbFacade::make(
            'admin.user.index', function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('User')
                    ->parent('admin.dashboard');
            }
        );

        BreadcrumbFacade::make(
            'admin.user.create', function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Create')
                    ->parent('admin.dashboard')
                    ->parent('admin.user.index');
            }
        );

        BreadcrumbFacade::make(
            'admin.user.edit', 
            function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Edit')
                    ->parent('admin.dashboard')
                    ->parent('admin.user.index');
            }
        );
        BreadcrumbFacade::make(
            'admin.user.show', function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Show')
                    ->parent('admin.dashboard')
                    ->parent('admin.user.index');
            }
        );
        BreadcrumbFacade::make(
            'admin.user-group.index', function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('User Group')
                    ->parent('admin.dashboard');
            }
        );

        BreadcrumbFacade::make(
            'admin.user-group.create', function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Create')
                    ->parent('admin.dashboard')
                    ->parent('admin.user-group.index');
            }
        );

        BreadcrumbFacade::make(
            'admin.user-group.edit', function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Edit')
                    ->parent('admin.dashboard')
                    ->parent('admin.user-group.index');
            }
        );
        BreadcrumbFacade::make(
            'admin.user-group.show', function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Show')
                    ->parent('admin.dashboard')
                    ->parent('admin.user-group.index');
            }
        );
        BreadcrumbFacade::make(
            'admin.admin-user.index', 
            function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Admin User')
                    ->parent('admin.dashboard');
            }
        );

        BreadcrumbFacade::make(
            'admin.admin-user.create',
            function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Create')
                    ->parent('admin.dashboard')
                    ->parent('admin.admin-user.index');
            }
        );

        BreadcrumbFacade::make(
            'admin.admin-user.edit',
            function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Edit')
                    ->parent('admin.dashboard')
                    ->parent('admin.admin-user.index');
            }
        );

        BreadcrumbFacade::make(
            'admin.admin-user.show',
            function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Show')
                    ->parent('admin.dashboard')
                    ->parent('admin.admin-user.index');
            }
        );

        BreadcrumbFacade::make(
            'admin.role.index',
            function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Role')
                    ->parent('admin.dashboard');
            }
        );

        BreadcrumbFacade::make(
            'admin.role.create',
            function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Create')
                    ->parent('admin.dashboard')
                    ->parent('admin.role.index');
            }
        );

        BreadcrumbFacade::make(
            'admin.role.edit',
            function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Edit')
                    ->parent('admin.dashboard')
                    ->parent('admin.role.index');
            }
        );
        BreadcrumbFacade::make(
            'admin.role.show', 
            function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Show')
                    ->parent('admin.dashboard')
                    ->parent('admin.role.index');
            }
        );

        BreadcrumbFacade::make(
            'admin.configuration', 
            function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Configuration')
                    ->parent('admin.dashboard');
            }
        );

        BreadcrumbFacade::make(
            'admin.site-currency.index', 
            function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Site Currency')
                    ->parent('admin.dashboard');
            }
        );

        BreadcrumbFacade::make(
            'admin.site-currency.create', 
            function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Create')
                    ->parent('admin.dashboard')
                    ->parent('admin.site-currency.index');
            }
        );
        BreadcrumbFacade::make(
            'admin.site-currency.edit', 
            function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Edit')
                    ->parent('admin.dashboard')
                    ->parent('admin.site-currency.index');
            }
        );
        BreadcrumbFacade::make(
            'admin.site-currency.show', 
            function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Show')
                    ->parent('admin.dashboard')
                    ->parent('admin.site-currency.index');
            }
        );
        BreadcrumbFacade::make(
            'admin.country.index', 
            function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Country')
                    ->parent('admin.dashboard');
            }
        );

        BreadcrumbFacade::make(
            'admin.country.create', 
            function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Create')
                    ->parent('admin.dashboard')
                    ->parent('admin.country.index');
            }
        );

        BreadcrumbFacade::make(
            'admin.country.edit', 
            function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Edit')
                    ->parent('admin.dashboard')
                    ->parent('admin.country.index');
            }
        );
        BreadcrumbFacade::make(
            'admin.country.show', 
            function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Show')
                    ->parent('admin.dashboard')
                    ->parent('admin.country.index');
            }
        );
        BreadcrumbFacade::make(
            'admin.state.index', 
            function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('State')
                    ->parent('admin.dashboard');
            }
        );

        BreadcrumbFacade::make(
            'admin.state.create', 
            function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Create')
                    ->parent('admin.dashboard')
                    ->parent('admin.state.index');
            }
        );

        BreadcrumbFacade::make(
            'admin.state.edit', 
            function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Edit')
                    ->parent('admin.dashboard')
                    ->parent('admin.state.index');
            }
        );

        BreadcrumbFacade::make(
            'admin.state.show', 
            function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Edit')
                    ->parent('admin.dashboard')
                    ->parent('admin.state.index');
            }
        );

        BreadcrumbFacade::make(
            'admin.module.index', 
            function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Module')
                    ->parent('admin.dashboard');
            }
        );

        BreadcrumbFacade::make(
            'admin.module.create',
            function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Upload')
                    ->parent('admin.dashboard')
                    ->parent('admin.module.index');
            }
        );

        BreadcrumbFacade::make(
            'admin.theme.index',
            function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Theme')
                    ->parent('admin.dashboard');
            }
        );

        BreadcrumbFacade::make(
            'admin.theme.create', 
            function (Breadcrumb $breadcrumb) {
                $breadcrumb->label('Upload')
                    ->parent('admin.dashboard')
                    ->parent('admin.theme.index');
            }
        );
    }
1324905
public function renderBreadcrumb($class = 'breadcrumb', $itemClass = 'breadcrumb-item', $list = true) {
        $breadcrumb = new Breadcrumb();
        $breadcrumb->navArray = $this->navigation;
        return $breadcrumb->setBreacrumbLinks($this->currentArray)->createBreadcrumb($class, $itemClass, $list);
    }
136009
public function breadcrumb()
    {
        $environment = $this->getEnvironment();

        $event = new GetBreadcrumbEvent($environment);
        $environment->getEventDispatcher()->dispatch($event::NAME, $event);

        $elements = $event->getElements();

        if (!\is_array($elements) || !\count($elements)) {
            return null;
        }

        $GLOBALS['TL_CSS']['cca.dc-general.generalBreadcrumb'] = 'bundles/ccadcgeneral/css/generalBreadcrumb.css';

        return $this->getTemplate('dcbe_general_breadcrumb')
            ->set('elements', $elements)
            ->parse();
    }
386237
def zinnia_breadcrumbs(context, root_name='',
                       template='zinnia/tags/breadcrumbs.html',):
    
    path = context['request'].path
    context_object = get_context_first_object(
        context, ['object', 'category', 'tag', 'author'])
    context_page = context.get('page_obj')
    breadcrumbs = retrieve_breadcrumbs(
        path, context_object, context_page, root_name)

    return {'template': template,
            'breadcrumbs': breadcrumbs}
10698
public function breadcrumb(BreadcrumbItem $mainItem, Breadcrumb $breadcrumb)
    {
        $this->dataCollection->add('mainItem', $mainItem);
        $this->dataCollection->add('breadcrumb', $breadcrumb);

        return $this->render('Breadcrumb');
    }
876673
protected function setBreadcrumbListHelp()
    {
        $breadcrumbs = array();

        $breadcrumbs[] = array(
            'url' => $this->url('admin'),
            'text' => $this->text('Dashboard')
        );

        $breadcrumbs[] = array(
            'url' => $this->url('admin'),
            'text' => $this->text('Dashboard')
        );

        $this->setBreadcrumbs($breadcrumbs);
    }
1177631
private function createBreadcrumbRoot()
    {
        if (null === $this->breadcrumb) {
            if (null === $home = $this->pageHelper->getHomePage()) {
                throw new \RuntimeException('Home page not found.');
            }
            $this->breadcrumb = $this->factory->createItem('root', [
                'childrenAttributes' => [
                    'class' => 'breadcrumb hidden-xs',
                ],
            ]);
            $this->tagManager->addTags($home->getEntityTag());
        }
    }
778802
function breadcrumbPoints(d, i) {
  var points = [];
  points.push("0,0");
  points.push(b.w + ",0");
  points.push(b.w + b.t + "," + (b.h / 2));
  points.push(b.w + "," + b.h);
  points.push("0," + b.h);
  if (i > 0) { // Leftmost breadcrumb; don't include 6th vertex.
    points.push(b.t + "," + (b.h / 2));
  }
  return points.join(" ");
}