Building breadcrumbs can be a fairly independent practice—meaning what works for one, won’t work for everyone else. For example, here’s breadcrumb code I used for a recent client site:
<div class="breadcrumbs">
<small>
<a href="http://www.site.org" title="My Web Site">Home</a>
{if segment_1 !=""} › <a href="/{segment_1}/" title="{segment_1}">{exp:php_text_format type="ucwords"}{segment_1}{/exp:php_text_format}</a>{/if}
{if segment_2 !="" AND segment_2 !="article"} › <a href="/{segment_1}/{segment_2}/">{exp:weblog:category_heading}{exp:php_text_format type="ucwords"}{category_name}{/exp:php_text_format}{/exp:weblog:category_heading}</a>{/if}
{if segment_2 =="article"} › {exp:weblog:entries weblog="about|blog|digital|tech|mobile|workshops|resources|projects" limit="1" status="not Closed" disable="trackbacks"}{title}{/exp:weblog:entries}{/if}
{if segment_3 =="article"} › {exp:weblog:entries weblog="about|blog|digital|tech|mobile|workshops|resources|projects" limit="1" status="not Closed" disable="trackbacks"}{title}{/exp:weblog:entries}{/if}
</small>
</div>
I’ve added spacing so that the various if statements are more distinguishable. But as you can see, the statements generally take into consideration how you’ve set-up the site navigation and url structure in the first place. For this client, segment_1 was always the section that they were in, and sections matched weblogs and template_groups simultaneously. Since the segments were simple, I just used the {segment_1} code, but if they had been more complicated (example: products == Product Catalog, then I could have used the weblog name (not short name) instead of {segment_1}.
This was a custom url project for a client, so the second segment was typically a category_id. So obviously a query to return the category name, and not the id. Etc., etc.
But, this is just one example, I find that reusing breadcrumb code is about bits and pieces, there has only been a few times when I been able to just paste in the code from one site to the next.