You are here

function crumbs_get_breadcrumb_data in Crumbs, the Breadcrumbs suite 7.2

Same name and namespace in other branches
  1. 6.2 crumbs.module \crumbs_get_breadcrumb_data()
  2. 7 crumbs.module \crumbs_get_breadcrumb_data()

Returns the breadcrumb data for the current page.

Gets the menu trail for the current page, and then uses it to build the breadcrumb. Each link is themed separately, and then the links are passed to theme('breadcrumb'), which returns the final rendered breadcrumb.

Note: If the existing Drupal-provided breadcrumb is empty, then Crumbs makes no effort to calculate its own, since it means that a module has intentionally removed it.

Breadcrumbs with one item are also ignored, to prevent the breadcrumb from being shown on the frontpage.

Return value

array An associative array with the following keys:

  • trail: An array containing the menu trail of the current page.
  • items: An array containing the built breadcrumb.
  • html: The rendered breadcrumb received from theme('breadcrumb').

or FALSE if the breadcrumb could not be determined.

File

./crumbs.module, line 93
Provides an API for building breadcrumbs.

Code

function crumbs_get_breadcrumb_data() {
  return crumbs()->page->breadcrumbData;
}