Nevermind, I figured it out with some help from a post in the suggestions forum by banswidthjunkie.
For those interested in using an image for your breadcrumb separator use these steps:
In includes/classes/breadcrumbs.php change:
Code:
function trail($separator = ' ') {
$trail_string = '';
for ($i=0, $n=sizeof($this->_trail); $i<$n; $i++) {
// echo 'breadcrumb ' . $i . ' of ' . $n . ': ' . $this->_trail[$i]['title'] . '<br />';
$skip_link = false;
if ($i==($n-1) && DISABLE_BREADCRUMB_LINKS_ON_LAST_ITEM =='true') {
$skip_link = true;
}
if (isset($this->_trail[$i]['link']) && zen_not_null($this->_trail[$i]['link']) && !$skip_link ) {
// this line simply sets the "Home" link to be the domain/url, not main_page=index?blahblah:
if ($this->_trail[$i]['title'] == HEADER_TITLE_CATALOG) {
$trail_string .= ' <a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . $this->_trail[$i]['title'] . '</a>';
} else {
$trail_string .= ' <a href="' . $this->_trail[$i]['link'] . '">' . $this->_trail[$i]['title'] . '</a>';
}
} else {
$trail_string .= $this->_trail[$i]['title'];
}
if (($i+1) < $n) $trail_string .= $separator;
$trail_string .= "\n";
}
return $trail_string;
}
to this:
Code:
function trail($separator = ' ') {
$trail_string = '';
for ($i=0, $n=sizeof($this->_trail); $i!=$n; ++$i) {
$crumb = '';
$skip_link = false;
if ($i==($n-1) && DISABLE_BREADCRUMB_LINKS_ON_LAST_ITEM =='true') {
$skip_link = true;
}
if (isset($this->_trail[$i]['link']) && zen_not_null($this->_trail[$i]['link']) && !$skip_link ) {
// this line simply sets the "Home" link to be the domain/url, not main_page=index?blahblah:
if ($this->_trail[$i]['title'] == HEADER_TITLE_CATALOG) {
$crumb .= '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . $this->_trail[$i]['title'] . '</a>';
} else {
$crumb .= '<a href="' . $this->_trail[$i]['link'] . '">' . $this->_trail[$i]['title'] . '</a>';
}
} else {
$crumb .= $this->_trail[$i]['title'];
}
// Add the styling here by wrapping the crumb an separator in span tags
$trail_string .= '<span class="crumb">' . $crumb . '</span>';
if (($i+1) < $n) $trail_string .= '<span class="crumb-separator"> ' . $separator . ' </span>';
}
return $trail_string;
}
This allows you to style both the separator and well as the breadcrumb text in your stylesheet, using .crumb and .crumb-separator as the selectors. This is banswidthjunkie's idea and it works great. Now you can style your breadcrumbs however you want!
What I did then, since I want the little arrow from my flyout category menu to be used as the breadcrumb separator, is add this style to my main stylesheet:
Code:
.crumb-separator {
background:url(../images/submenu.gif) 50% 50% no-repeat;
}
The last step was to go into the admin panel and navigate to configuration>layout settings and change:
Bread Crumbs Navigation Separator from the default :: to (just remove the :: or whatever you have in place, leaving just the 2 )
That's it! You may need to adjust the spacing to make your image fit correctly, but other than that you are set.
Matt
Bookmarks