1-line Breadcrumb design

Permalink
I've struggled with this for 3 days. Can someone give me any up-to-date code that displays the breadcrumb on one line rather than the default tree structure?

I was using an old code I found through the forums, but it does not work with the new replace_link_with_first_in_nav function.

I want something that looks like this:

Home > Category > You Are Here

Thanks.

Here was the old one-line code I found that looked beautiful but did not have the up-to-date functionality:
<?php  
defined('C5_EXECUTE') or die(_("Access Denied."));  
$aBlocks = $controller->generateNav();  
global $c;  
//output  
show_breadcrumb($c);  
function show_breadcrumb($c){  
$nh=Loader::helper('navigation');  
$breadcrumb=$nh->getTrailToCollection($c);  
krsort($breadcrumb);  
foreach($breadcrumb as $bcpage){  
echo'<a href="'.BASE_URL.DIR_REL.$bcpage->getCollectionPath().'/">'.$bcpage->getCollectionName().'</a> > ';  
}  
echo$c->getCollectionName();  
}


And here is how I revised it with Andrew's help:
<?php  
defined('C5_EXECUTE') or die(_("Access Denied."));  
   $nh = Loader::helper('navigation');
$aBlocks = $controller->generateNav();  
global $c;  
//output  
show_breadcrumb($c);  
function show_breadcrumb($c){  
$nh=Loader::helper('navigation');  
$breadcrumb=$nh->getTrailToCollection($c);  
krsort($breadcrumb);  
foreach($breadcrumb as $bcpage){ 
   $pageLink = false;
   if ($_c->getCollectionAttributeValue('replace_link_with_first_in_nav')) {
   $subPage = $_c->getFirstChild();


But, the revision just gave me an error:
Parse error: syntax error, unexpected $end in /var/www/domains/php.22graphics.com/docs/blocks/autonav/templates/breadcrumb-new.php on line 28

Probably did the revision wrong, but I tried 3 different ways based on the instructions I was given.

 
Mnkras replied on at Permalink Reply
Mnkras
click on the autonav, click Custom template click breadcrumb, Tada!

Mike
zoinks replied on at Permalink Reply
This breadcrumb template needs to be brought up to date. It does not include the 'replace_link_with_first_in_nav' functionality for some reason.
zoinks replied on at Permalink Reply
see above
zoinks replied on at Permalink Reply
see above

(edited last 2 posts for ease of reading)

This template is not up-to-date and needs to be fixed.

header_menu includes 'replace_link_with_first_in_nav'

but breadcrumb does not for some reason.

Since I started with an older tutorial, this caused me a huge confusing mess. As is, it is not fully functional and should be fixed, obviously, since it is a core element using a core function.