-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate.php
More file actions
executable file
·35 lines (29 loc) · 1.01 KB
/
template.php
File metadata and controls
executable file
·35 lines (29 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
/**
* @file menu-block-wrapper.tpl.php
*/
/**
* Implements theme_easy_greadcrumb()
*/
function etsh_base_easy_breadcrumb($variables) {
$breadcrumb = $variables['breadcrumb'];
$segments_quantity = $variables['segments_quantity'];
$separator = $variables['separator'];
$html = '';
if ($segments_quantity > 0) {
for ($i = 0, $s = $segments_quantity - 1; $i < $segments_quantity; ++$i) {
$it = $breadcrumb[$i];
$content = decode_entities($it['content']);
if (isset($it['url'])) {
$html .= l($content, $it['url'], array('attributes' => array('class' => $it['class'])));
} else {
$class = implode(' ', $it['class']);
$html .= '<span class="' . $class . '">' . check_plain($content) . '</span>';
}
if ($i < $s) {
$html .= '<span class="easy-breadcrumb_segment-separator"> ' . $separator . ' </span>';
}
}
}
return $html;
}