function _custom_breadcrumbs_get_trail_items in Custom Breadcrumbs 6.2
Same name and namespace in other branches
- 7.2 custom_breadcrumbs.module \_custom_breadcrumbs_get_trail_items()
 
Builds the trail items for a given breadcrumb specification.
Parameters
$breadcrumb: The breadcrumb object.
$titles: An array of titles (after token replacement).
$paths: An array of paths (after token replacement) that may contain special identifiers.
Return value
An associative array of trail items with keys 'title' - the title of the item 'href' - the path of the item used to set the active trail 'crumb'- the html crumb for use in the breadcrumb
1 call to _custom_breadcrumbs_get_trail_items()
- _custom_breadcrumbs_get_breadcrumb in ./
custom_breadcrumbs.module  - Gets the custom breadcrumb.
 
File
- ./
custom_breadcrumbs.module, line 422  - Provide custom breadcrumbs for node-type pages and base functionality for submodules to add custom breadcrumbs for other types of pages.
 
Code
function _custom_breadcrumbs_get_trail_items($breadcrumb, $titles, $paths) {
  $trail_items = array();
  for ($i = 0; $i < count($titles); $i++) {
    $title = trim($titles[$i]);
    if ($title != '' && $title != '<none>') {
      // Create a breadcrumb only if there is a title.
      // Include optional html attributes.
      $options = _custom_breadcrumbs_identifiers_option($i + 1, $breadcrumb->bid);
      $crumb_items = _custom_breadcrumbs_create_crumb_items($title, trim($paths[$i]), $options);
      $trail_items = array_merge($trail_items, $crumb_items);
    }
  }
  return $trail_items;
}