You are here

function crumbs_get_trail in Crumbs, the Breadcrumbs suite 7.2

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

Returns the trail for the provided path.

Parameters

$path: The path for which the trail is built. If NULL, the url of the current page is assumed.

Return value

mixed An associative array containing the trail, with the paths as the keys, and the router items (as received from crumbs_get_router_item()) as the values.

See also

crumbs_TrailFinder

1 call to crumbs_get_trail()
_crumbs_themekey_path2trailpaths in includes/crumbs.callbacks.inc
Callback for themekey integration.

File

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

Code

function crumbs_get_trail($path = NULL) {
  if (!isset($path)) {
    $path = $_GET['q'];
  }
  return crumbs()->trails
    ->getForPath($path);
}