Tuesday 14 August 2012

Breadcrumb Navigation For Blogger

Important: All scripts hosted on widcraft.googlecode.com don't work anymore because Google has blocked that SVN repository.

If you wanna be a pro-blogger then you must need a great navigation on your blog. Just like many famous sites and wordpress you can add a navigation on your blogger which is simply cool.

Let Me Explain :

Above your post title it'll look like this : Home >> Name Of A Label >> Post Title

How To Add :

  • Go To Blogger > Template > Edit HTML > Mark 'Expand Widgets Template'
  • Press CTRL and F on your keyboard and search for this code:
<b:include data='top' name='status-message'/>
  • Right below that paste it :
<b:include data='posts' name='breadcrumb'/>
There may be two occurrences of <b:include data='top' name='status-message'> in your template, you should do the same thing if there’s a second one.
  • Now search for this code:
<b:includable id='main' var='top'>
  • Just above it, paste this code:
<b:includable id='breadcrumb' var='posts'>
<b:if cond='data:blog.homepageUrl == data:blog.url'>
<b:else/>
<b:if cond='data:blog.pageType == "item"'>
<p class='breadcrumbs'>
<span class='post-labels'>
<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>
</b:if>
</b:loop>
<b:else/>
»Unlabelled
</b:if>
» <span><data:post.title/></span>
</b:loop>
</span>
</p>
<b:else/>
<b:if cond='data:blog.pageType == "archive"'>
<p class='breadcrumbs'>
<span class='post-labels'>
<a expr:href='data:blog.homepageUrl'>Home</a> » Archives for <data:blog.pageName/>
</span>
</p>
<b:else/>
<b:if cond='data:blog.pageType == "index"'>
<p class='breadcrumbs'>
<span class='post-labels'>
<b:if cond='data:blog.pageName == ""'>
<a expr:href='data:blog.homepageUrl'>Home</a> » All posts
<b:else/>
<a expr:href='data:blog.homepageUrl'>Home</a> » Posts filed under <data:blog.pageName/>
</b:if>
</span>
</p>
</b:if>
</b:if>
</b:if>
</b:if>
</b:includable>
Now time to add some css....you can add below css or change it with custom css if you know any thing about css.

  • Search for ]]></b:skin>
  • Just above it post following CSS
.breadcrumbs {
padding:5px 5px 5px 0px;
margin: 0px 0px 15px 0px;
font-size:90%;
line-height: 1.4em;
border-bottom:3px double #e6e4e3;
font-weight:bold;
}
OK almost done....now time for final and most important step
  • Save The Template
Now it's done.....if you're facing any problems then please let me know.....Thanks!!
Important: Check our new website TricksPanda.com for WordPress tutorials, plugins and more.
 
Powered by Blogger.