Skip to main content

more blogger fun: breadcrumbs

You can replace the status message by breadcrumbs.

step 1
find in your template: <b:include data='top' name='status-message'/>

comment that out, like this: <!-- b:include data='top' name='status-message'/ -->

step 2
insert following code after the line of step 1. The code is a modification of the code found on bloggerbuster.


<!-- breadcrumbs -->
<div id='places'>
<b:if cond='data:blog.homepageUrl == data:blog.url'>
<div class='breadcrumbs'>
<data:blog.title/> » <strong>Home</strong>
</div>
<b:else/>
<b:if cond='data:blog.pageType == "item"'>
<div class='breadcrumbs'>

<a expr:href='data:blog.homepageUrl' rel='tag'>Home</a>
<b:loop values='data:posts' var='post'>
<b:if cond='data:post.labels'>
<b:loop values='data:post.labels' var='label'>
<b:if cond='data:label.isLast == "true"'> »
<a expr:href='data:label.url' rel='tag'><data:label.name/></a> » <span class='post-title entry-title'><data:post.title/></span>
</b:if>

</b:loop>
</b:if>
</b:loop>


</div>
</b:if>
<b:else/>
<b:if cond='data:blog.pageType == "archive"'>
<div class='breadcrumbs'>
<a expr:href='data:blog.homepageUrl'>Home</a> » Archives for <data:blog.pageName/>
</div>
</b:if>
<b:else/>
<b:if cond='data:navMessage'>
<div class='breadcrumbs'>
<data:navMessage/>
</div>
</b:if>
</b:if>
</div><!-- end places -->


step 3

Apply some css.
In your templte add


/** added for breadcrumbs */
#places {
border: 1px solid #fff;
padding: 5px 15px;
margin: 10px 0;
line-height: 1.4em;
}

Comments