root / drupal7 / sites / all / themes / bootstrap / templates / system / breadcrumb.func.php @ caf16a48
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 |
$output = ''; |
23 |
$breadcrumb = $variables['breadcrumb']; |
24 |
|
25 |
// Determine if we are to display the breadcrumb.
|
26 |
$bootstrap_breadcrumb = bootstrap_setting('breadcrumb'); |
27 |
if (($bootstrap_breadcrumb == 1 || ($bootstrap_breadcrumb == 2 && arg(0) == 'admin')) && !empty($breadcrumb)) { |
28 |
$output = theme('item_list', array( |
29 |
'attributes' => array( |
30 |
'class' => array('breadcrumb'), |
31 |
), |
32 |
'items' => $breadcrumb, |
33 |
'type' => 'ol', |
34 |
)); |
35 |
} |
36 |
return $output; |
37 |
} |