Project

General

Profile

Paste
Download (1.03 KB) Statistics
| Branch: | Revision:

root / drupal7 / sites / all / themes / bootstrap / templates / system / breadcrumb.func.php @ 1f623f01

1
<?php
2
/**
3
 * @file
4
 * Stub file for bootstrap_breadcrumb().
5
 */
6

    
7
/**
8
 * Returns HTML for a breadcrumb trail.
9
 *
10
 * @param array $variables
11
 *   An associative array containing:
12
 *   - breadcrumb: An array containing the breadcrumb links.
13
 *
14
 * @return string
15
 *   The constructed HTML.
16
 *
17
 * @see theme_breadcrumb()
18
 *
19
 * @ingroup theme_functions
20
 */
21
function bootstrap_breadcrumb($variables) {
22
  // Use the Path Breadcrumbs theme function if it should be used instead.
23
  if (_bootstrap_use_path_breadcrumbs()) {
24
    return path_breadcrumbs_breadcrumb($variables);
25
  }
26

    
27
  $output = '';
28
  $breadcrumb = $variables['breadcrumb'];
29

    
30
  // Determine if we are to display the breadcrumb.
31
  $bootstrap_breadcrumb = bootstrap_setting('breadcrumb');
32
  if (($bootstrap_breadcrumb == 1 || ($bootstrap_breadcrumb == 2 && arg(0) == 'admin')) && !empty($breadcrumb)) {
33
    $output = theme('item_list', array(
34
      'attributes' => array(
35
        'class' => array('breadcrumb'),
36
      ),
37
      'items' => $breadcrumb,
38
      'type' => 'ol',
39
    ));
40
  }
41
  return $output;
42
}