Friday, November 6, 2015

Blog - Membuat Breadcrumbs di Blogger

Tags

Cara membuat breadcrumbs/navigasi di atas postingan di Blogspot/Blogger.

1. Pilih menu "Template"
2. Lalu pilih "Edit HTML"
3. Kemudian cari kode / Ctrl+F "]]></b:skin>"
4. Copy kode di bawah ini dan paste tepat di atas kode "]]></b:skin>"

.breadcrumbs {
 padding:10px 5px 10px 30px; 
 margin: 0px 0px 15px 0px; 
 font-size:85%; 
 line-height: 1.4em; 
 border-bottom:10px solid #EEEEEE;
}


5. Kemudian cari kode / Ctrl+F "<b:includable id='main' var='top'>"
6. Copy kode di bawah ini dan ganti kode "<b:includable id='main' var='top'>"



<b:includable id='breadcrumb' var='posts'>
<b:if cond='data:blog.homepageUrl != data:blog.url'>
<b:if cond='data:blog.pageType == &quot;static_page&quot;'>
<div class='breadcrumbs'>
<span>
<a expr:href='data:blog.homepageUrl' rel='tag'>Home</a></span> &#187; <span><data:blog.pageName/>
</span>
</div>
<b:else/>
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<b:loop values='data:posts' var='post'>
<b:if cond='data:post.labels'>
<div class='breadcrumbs' xmlns:v='http://rdf.data-vocabulary.org/#'>
<span typeof='v:Breadcrumb'><a expr:href='data:blog.homepageUrl' property='v:title' rel='v:url'>Home</a></span>
<b:loop values='data:post.labels' var='label'>
&#187;
<span typeof='v:Breadcrumb'>
<a expr:href='data:label.url' property='v:title' rel='v:url'><data:label.name/></a>
</span>
</b:loop>
&#187;
<span><data:post.title/></span>
</div>
<b:else/>
<div class='breadcrumbs'>
<span>
<a expr:href='data:blog.homepageUrl' rel='tag'>Home</a>
</span>
&#187;
<span>Unlabelled</span>
&#187;
<span><data:post.title/></span>
</div>
</b:if>
</b:loop>
<b:else/>
<b:if cond='data:blog.pageType == &quot;archive&quot;'>
<div class='breadcrumbs'>
<span>
<a expr:href='data:blog.homepageUrl'>Home</a></span> &#187;
<span>Archives for <data:blog.pageName/>
</span>
</div>
<b:else/>
<b:if cond='data:blog.pageType == &quot;index&quot;'>
<div class='breadcrumbs'>
<b:if cond='data:blog.pageName == &quot;&quot;'>
<span>
<a expr:href='data:blog.homepageUrl'>Home</a>
</span>
&#187;
<span>All posts</span>
<b:else/>
<span>
<a expr:href='data:blog.homepageUrl'>Home</a>
</span>
&#187;
<span>Posts filed under <data:blog.pageName/></span>
</b:if>
</div>
</b:if>
</b:if>
</b:if>
</b:if>
</b:if>
</b:includable>
<b:includable id='main' var='top'>
<b:include data='posts' name='breadcrumb'/>


7. Terakhir pilih "Simpan Template"
Jika berhasil akan muncul seperti gambar di atas. Jika hasilnya tidak sesuai bisa edit di code CSS nya sesuai selera anda.

Terima kasih
Enjoy your day !



EmoticonEmoticon