This will limit the breadcrumbs length.. It won't truncate exactly, so you will always get complete crumbs, but it will truncate so that as soon as the total length goes over $max_trail in the code below:
function trail($separator = ' ') {
$trail_string = '';
$trail_len = 0;
$max_trail = 20;
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";
$trail_len += strlen($this->_trail[$i]['title']) + strlen($separator);
if ($trail_len > $max_trail)
break;
}
return $trail_string;
}
Just replace the function trail with the code above, and adjust max_trail according to your desired length.