What i want to do:
I want to prevent the breadcrump menu to display the first Structure!
Example:
|-Webroots
--www.enym.com [10]
---services
---feelings
---whatever
--www.phorce.de [20]
---damn
---exgirlfriend
---goaway
If I use it like: {BREADCRUMB:10}
then it always shows the first item as "www.enym.com" but i want this to be called "home" or whatever.
I could make such a link on my own and would love to make the breadcrump NOT show the initial thing.
Any Ideas? I am sure i have to edit somehting in the "include/inc_front/front.func.inc" in this part:
Code: Select all
// -------------------------------------------------------------
function get_breadcrumb ($start_id, $struct_array) {
//returns the breadcrumb path starting with given start_id
$data = array();
while ($start_id) {
$data[$start_id] = $struct_array[$start_id]["acat_name"];
$start_id = $struct_array[$start_id]["acat_struct"];
}
if(!empty($struct_array[$start_id]["acat_name"])) {
$data[$start_id] = $struct_array[$start_id]["acat_name"];
}
return array_reverse($data, 1);
}
// -------------------------------------------------------------
function breadcrumb ($start_id, $struct_array, $end_id, $link_to="index.php", $spacer=" > ") {
//builds the breadcrumb menu based on given values
//$link_to = the page on which the breadcrum part links
//$root_name = name of the breadcrumb part if empty/false/0 $start_id
//$spacer = how should breadcrumb parts be divided
$start_id = intval($start_id);
$end_id = intval($end_id);
$act_id = $start_id; //store actual ID for later comparing
while ($start_id) { //get the breadcrumb path starting with given start_id
$data[$start_id] = $struct_array[$start_id]["acat_name"];
$start_id = $struct_array[$start_id]["acat_struct"];
if($end_id && $start_id == $end_id) break;
}
$data[$start_id] = $struct_array[$start_id]["acat_name"];
//enym: das erste element aus dem array löschen
//$deleted_element = array_shift($data);
$crumbs_part = array_reverse($data, 1);
//enym: das erste element aus dem array löschen
//$deleted_element = array_shift($crumbs_part);
if(is_array($crumbs_part) && count($crumbs_part)) {
$breadcrumb = "";
foreach($crumbs_part as $key => $value) {
$alias = '';
if ($act_id != $key) {
if($breadcrumb) $breadcrumb .= $spacer;
if(!$struct_array[$key]["acat_redirect"]) {
$breadcrumb .= '<a href="index.php?';
$alias = $struct_array[$key]["acat_alias"];
$breadcrumb .= ($alias) ? html_specialchars($alias) : 'id='.$key.',0,0,1,0,0';
$breadcrumb .= '">';
} else {
$redirect = get_redirect_link($struct_array[$key]["acat_redirect"], ' ', '');
$breadcrumb .= '<a href="'.$redirect['link'].'"'.$redirect['target'].'>';
}
$breadcrumb .= html_specialchars($crumbs_part[$key]).'</a>';
} else {
if($breadcrumb) $breadcrumb .= $spacer;
$breadcrumb .= html_specialchars($crumbs_part[$key]);
}
}
} else {
$breadcrumb = "";
}
return $breadcrumb;
}
// -------------------------------------------------------------