一般breadcrumb的首頁都是相對路徑"/"
請問可以設為絕對路徑嗎?
我的template.php 的 breadcrumb :
function phptemplate_breadcrumb($breadcrumb) {
if(!empty($breadcrumb)) {
$breadcrumb[] = l(t(drupal_get_title()), $_REQUEST['q']);
}
return "
".implode(' › ', $breadcrumb)."
";
}
function yourthemenamne_preprocess_page(&$variables) {
$node = $variables['node'];
$terms = $node->taxonomy;
if(is_array($terms)) {
$tax = array();
$tax[]= l(t('Home'),'');
foreach($terms as $k=>$term) {
$tax[] = l(t($term->name),'taxonomy/term/'.$term->tid);
}
$variables['breadcrumb'] = theme('breadcrumb', $tax);
}
}
請問首頁要改為絕對路徑要怎麼修改呢?
Re: 如何將breadcrumb的首頁改為絕對路徑
<?php
$tax[]= l(t('Home'),'');
?>
<?php
$tax[]= l(t('Home'),'', array('absolute' => TRUE));
?>
---
notaBlueScreen