Breadcrumbs in Movable Type

Freshness Warning
This blog post is over 18 years old. It's possible that the information you read below isn't current and the links no longer work.

P. Obels asked

How do you get the links on top of your site in movabletype which point out where you are?

like:

Home » Our Thinking » Measure Twice » Archive » Tools and Utilities

Since he’s not the first person who’s asked, and I’m getting tired of re-writing the answer, I’m blogging it so I can simply point people here.

The short answer is: manually.

Each MT template has the breadcrumbs manually defined. The only variable part of the breadcrumb is (in most templates) the last item in the list. So my archive template that creates both category and monthly archives has this in it:

<p class="breadcrumb"><a href="/">Home</a> » <a href="/thinking/">Our Thinking</a> » <a href="/blog/">Measure Twice</a> » <a href="/blog/archives/">Archive</a> » <MTArchiveTitle></p>

And the individual archive template contains

<p class="breadcrumb"><a href="/">Home</a> » <a href="/thinking/">Our Thinking</a> » <a href="/blog/">Measure Twice</a> » <MTEntryTitle></p>

Paulo
May 5, 2004 12:28 PM

For my breadcrumbs I pass a "$crumbs" array into my PHP templating class and parse it out with a breadcrumbs() method. It took me about a day of sporadic head-banging to realize that some individudal archive pages were giving errors because they had apostrophes in their titles and I had forgotten to use <$MTEntryTitle encode_php="q"$>

Bas
May 5, 2004 12:37 PM

How about, for a category or a date archive: <a href="<$MTBlogURL$>">Home</a> / <a href="<$MTBlogArchiveURL$>">Archive</a> / <span class="Selected"><$MTArchiveTitle$></span> And for an individual arcive: <a href="<$MTBlogURL$>">Home</a> / <a href="<$MTBlogArchiveURL$>">Archive</a> / <MTEntryCategories glue=" & "><a href="<$MTCategoryArchiveLink$>"><$MTCategoryLabel$></a></MTEntryCategories> / ...

Adam Kalsey
May 5, 2004 1:24 PM

For me, it's helpful to hardcode some of my URLs (like the archive URL) into the templates because of the way I'm sharing templates across blogs. But using MTBlogURL and MTBlogArchiveURL is probably best for most. Good suggestion. Howeverm I don't like the category list in the breadcrumb. For a breadcrumb to be useful (and it might not be according to some reaseach I've read) it needs to be concise. Having a list of all the places within the site architecture that this element *might* be found is counter-productive.

Bas
May 6, 2004 9:28 AM

On the matter of the category list: I get your point and I am bound to aggree. Still, this depends mostly on how one uses the categories. If one always prvides a category, an item always has a single 'main' category, which could be used for a single breadcrum. Have a look at my site and tell me if you think it's useful (and usable) here. (If you can see through the Dutch language! ;-) And while your at it, give some attention to my filenames too: Google loves these!

Randy
May 10, 2004 7:19 AM

I use the SubCategories plug-in [http://www.rayners.org/2003/08/19/subcategories.php] for Movable Type to create a hierarchy of categories. I organized my categories so that the category hierarchy corresponds to what I want the breadcrumbs to look like. I then use code similar to that provided at the SubCategories site to generate the breadcrumbs.

Trackback from BnKB
February 6, 2005 11:17 PM

Breadcrumbs in Movable Type

Excerpt: Breadcrumbs in Movable Type :: Adam Kalsey Each MT template has the breadcrumbs manually defined. The only variable part of the breadcrumb is (in most templates) the last item in the list. So my archive template that creates both category...

This discussion has been closed.

Recently Written

The Trap of The Sales-Led Product (Dec 10)
It’s not a winning way to build a product company.
The Hidden Cost of Custom Customer Features (Dec 7)
One-off features will cost you more than you think and make your customers unhappy.
Domain expertise in Product Management (Nov 16)
When you're hiring software product managers, hire for product management skills. Looking for domain experts will reduce the pool of people you can hire and might just be worse for your product.
Strategy Means Saying No (Oct 27)
An oft-overlooked aspect of strategy is to define what you are not doing. There are lots of adjacent problems you can attack. Strategy means defining which ones you will ignore.
Understanding vision, strategy, and execution (Oct 24)
Vision is what you're trying to do. Strategy is broad strokes on how you'll get there. Execution is the tasks you complete to complete the strategy.
How to advance your Product Market Fit KPI (Oct 21)
Finding the gaps in your product that will unlock the next round of growth.
Developer Relations as Developer Success (Oct 19)
Outreach, marketing, and developer evangelism are a part of Developer Relations. But the companies that are most successful with developers spend most of their time on something else.
Developer Experience Principle 6: Easy to Maintain (Oct 17)
Keeping your product Easy to Maintain will improve the lives of your team and your customers. It will help keep your docs up to date. Your SDKs and APIs will be released in sync. Your tooling and overall experience will shine.

Older...

What I'm Reading

Contact

Adam Kalsey

+1 916 600 2497

Resume

Public Key

© 1999-2023 Adam Kalsey.