| 1 |
<?php
|
| 2 |
// $Id: template.php,v 1.1.4.1 2009/06/12 21:45:14 deekayen Exp $
|
| 3 |
|
| 4 |
/**
|
| 5 |
* @return string
|
| 6 |
*/
|
| 7 |
function phptemplate_breadcrumb($breadcrumb) {
|
| 8 |
if(sizeof($breadcrumb) > 0) {
|
| 9 |
return implode(' » ', $breadcrumb);
|
| 10 |
}
|
| 11 |
return '';
|
| 12 |
}
|
| 13 |
/**
|
| 14 |
* Override formatting of primary and secondary links.
|
| 15 |
*
|
| 16 |
* @return string
|
| 17 |
*/
|
| 18 |
function phptemplate_links($links) {
|
| 19 |
$output = '';
|
| 20 |
|
| 21 |
if (count($links) > 0) {
|
| 22 |
$num_links = count($links);
|
| 23 |
$i = 1;
|
| 24 |
|
| 25 |
foreach ($links as $link) {
|
| 26 |
$html = isset($link['html']) && $link['html'];
|
| 27 |
|
| 28 |
$link['query'] = isset($link['query']) ? $link['query'] : NULL;
|
| 29 |
$link['fragment'] = isset($link['fragment']) ? $link['fragment'] : NULL;
|
| 30 |
|
| 31 |
if (isset($link['href'])) {
|
| 32 |
$output .= l($link['title'], $link['href'], array(
|
| 33 |
'attributes' => array('accesskey' => $i),
|
| 34 |
'query' => $link['query'],
|
| 35 |
'fragment' => $link['fragment'],
|
| 36 |
'absolute' => FALSE,
|
| 37 |
'html' => $html)
|
| 38 |
);
|
| 39 |
}
|
| 40 |
else if ($link['title']) {
|
| 41 |
if (!$html) {
|
| 42 |
$link['title'] = check_plain($link['title']);
|
| 43 |
}
|
| 44 |
$output .= $link['title'];
|
| 45 |
}
|
| 46 |
$output .= ' | ';
|
| 47 |
$i++;
|
| 48 |
}
|
| 49 |
}
|
| 50 |
return empty($output) ? '' : substr($output, 0, -3);
|
| 51 |
}
|