Berikut langkah mudah dalam membuat navigasi halaman :
1. Login Blogger
2. Klik Rancangan --> Edit HTML
3. Cari kode ]]></b:skin>
4 Letakkan kode css berikut diatas kode ]]></b:skin>
.feed-links{clear:both; line-height:0em; display:none}5. Sekarang cari </body> letakkan script di bawah ini di atas kode
.showpageArea a {text-decoration:underline;}
.showpageNum a {text-decoration:none;border: 1px solid #cccccc;margin:0 3px;padding:1px 4px;}
.showpageNum a:hover {border: 1px solid #cccccc;background-color:#cccccc;}
.showpagePoint {color:#333;text-decoration:none;border: 1px solid #cccccc;background: #cccccc;margin:0 3px;padding:1px 4px;}
.showpageOf {text-decoration:none;padding:3px;padding:1px 4px;}
.showpage a {text-decoration:none;border: 1px solid #cccccc;padding:1px 4px;}
.showpage a:hover {text-decoration:none;}
.showpageNum a:link,.showpage a:link {text-decoration:none;color:#333333;}
</body>
<!-- PAGE NAVIGATION STAR-->
<script type='text/javascript'>
var pageCount=12;
var displayPageNum=4;
var upPageWord ='◄';
var downPageWord ='►';
</script>
<script type='text/javascript'>
//<![CDATA[
document.getElementById("blog-pager").style.display="block";var canvas="";function writescript(a){document.write('<script src="/feeds/posts/summary?alt=json-in-script&callback='+a+"&start-index="+startindex+'&max-results=100" ><\/script>')}function writelabelscript(a){document.write('<script src="/feeds/posts/summary/-/'+label+"?alt=json-in-script&callback="+a+"&start-index="+startindex+'&max-results=100" ><\/script>')}var url=location.href,total;var already=new Boolean(false);var timestamps=new Array();if(url.indexOf("/search/label/")!=-1){if(url.indexOf("?updated-max")!=-1){var label=url.substring(url.indexOf("/search/label/")+14,url.indexOf("?updated-max"))}else{var label=url.substring(url.indexOf("/search/label/")+14,url.indexOf("?&max"))}}if(url.indexOf("#Page")!=-1){var currentpagenum=parseInt(url.substring(url.indexOf("#Page")+5,url.length))}else{var currentpagenum=1}var startindex=(currentpagenum-displayPageNum-1>0)?((currentpagenum-displayPageNum-2)*pageCount+1):1;var total=(2*displayPageNum+1)*pageCount;if(url.indexOf("?q=")==-1&&url.indexOf(".html")==-1){if(url.indexOf("/search/label/")==-1){var islabel=new Boolean(false);do{writescript("buildtimestamps");startindex+=100}while(total>startindex)}else{var islabel=new Boolean(true);do{writelabelscript("buildtimestamps");startindex+=100}while(total>startindex)}document.write('<script type="text/javascript">printnav();<\/script>')}function buildtimestamps(b){if(already==false){total=parseInt(b.feed.openSearch$totalResults.$t)}init=pageCount-1;for(var a=init;post=b.feed.entry[a];a+=pageCount){timestamps[timestamps.length]=encodeURIComponent(post.published.$t.substring(0,19)+post.published.$t.substring(23,29))}}function printlast(b){var a=encodeURIComponent(b.feed.entry[0].published.$t.substring(0,19)+b.feed.entry[0].published.$t.substring(23,29));if(islabel==false){link="search?updated-max="+a+"&max-results="+pageCount+"#Page"+maxpages}else{link="/search/label/"+label+"?updated-max="+a+"&max-results="+pageCount+"#Page"+maxpages}document.getElementById("showlastpage").innerHTML='<a href="'+link+'">'+maxpages+"</a>"}function printnav(){maxpages=Math.ceil(total/pageCount);canvas=canvas+'<span class="totalpages">Halaman ['+maxpages+"]</span>";var a=((currentpagenum+displayPageNum)<maxpages)?currentpagenum+displayPageNum:maxpages;var c=((currentpagenum-displayPageNum)>1)?currentpagenum-displayPageNum:1;if(currentpagenum>1){if(islabel==false){if(currentpagenum==2){link="/"}else{link="search?updated-max="+timestamps[(c==1)?currentpagenum-c-2:currentpagenum-c-1]+"&max-results="+pageCount+"#Page"+(currentpagenum-1)}}else{if(currentpagenum==2){link="/search/label/"+label+"?&max-results="+pageCount}else{link="/search/label/"+label+"?updated-max="+timestamps[(c==1)?currentpagenum-c-2:currentpagenum-c-1]+"&max-results="+pageCount+"#Page"+(currentpagenum-1)}}canvas=canvas+' <span class="showpage"><a href="'+link+'">◄</a></span>'}if(c!=1){if(islabel==true){canvas=canvas+'<span class="showpageNum"><a href="/search/label/'+label+"&max-results="+pageCount+'">1</a></span>'}else{canvas=canvas+'<span class="showpageNum"><a href="/">1</a></span>'}canvas=canvas+"..."}for(var b=c;b<=a;b++){if(islabel==true){if(b==1){link="/search/label/"+label+"?&max-results="+pageCount}else{link="/search/label/"+label+"?updated-max="+timestamps[(c==1)?b-c-1:b-c]+"&max-results="+pageCount+"#Page"+b}if(b==currentpagenum){canvas=canvas+'<span class="showpagePoint">'+b+"</span>"}else{canvas=canvas+'<span class="showpageNum"><a href="'+link+'">'+b+"</a></span>"}}else{if(b==1){link="/"}else{link="search?updated-max="+timestamps[(c==1)?b-c-1:b-c]+"&max-results="+pageCount+"#Page"+b}if(b==currentpagenum){canvas=canvas+'<span class="showpagePoint">'+b+"</span>"}else{canvas=canvas+'<span class="showpageNum"><a href="'+link+'">'+b+"</a></span>"}}}if(a!=maxpages){canvas=canvas+' .. <span id="showlastpage" class="showpage"></span>';startindex=Math.floor((total-1)/pageCount)*pageCount;if(islabel==true){writelabelscript("printlast")}else{writescript("printlast")}}if(currentpagenum<maxpages){if(islabel==false){link="search?updated-max="+timestamps[(c==1)?currentpagenum-c:currentpagenum+1-c]+"&max-results="+pageCount+"#Page"+(currentpagenum+1)}else{link="/search/label/"+label+"?updated-max="+timestamps[(c==1)?currentpagenum-c:currentpagenum+1-c]+"&max-results="+pageCount+"#Page"+(currentpagenum+1)}canvas=canvas+' <span class="showpage"><a href="'+link+'">►</a></span>'}document.getElementById("blog-pager").innerHTML=canvas};
//]]>
</script>
<!-- PAGE NAVIGATION STOP-->
Simpan template" se,oga berhasil jika ada pertanyaan koment aja di bawah ini insyallah saya akan membantu sobat.. :)
Label: Blogger, Tutorial Blog
13 komentar:
Manteplah, tapi aku g kpengen dipasangin Nav halaman, Soalnya kan udah ada "Posting lama", "Home", "lebih baru" dll di footer....^^
dicoba, tapi sayangnya ga bisa lihat demo nya ya gan?
@ serbaseru.com untuk demonya smentara ini bisa liat di blog saya
wah..saya gagal...g bisa di next...hahaha...
halamannya jadi cuma 1...yang berikut nya ilang nih...
Langsung praktek gan, makasih infonya... suksess selalu, visit back ya ...
langsung aja dipraktekan aja sob.. punyaku ni masih gambar home dan tombol next aja sob.. kalo nyari postingan kelamaen.. hehehe.. nice post sob..
d blog sy bs tampil. ttp untuk halaman selanjutnya "not found"
gimana sob? :)
bisa dicoba ni.....mantap
sob.. tadi sy nyoba navi kamu, dan berhasil.. terima kasih, tapi kenapa ya yg keluar kok cuman 1 arsip?, padahal saya punya 2 arsip ( bulan juni dan juli ) bisa bantu sy, bgm caranya biar keluar 2 halaman, terima ksh sob bantuannya
gue cari-cari yang beginian akhirnya dapet juga yg cocok, thx mas bos tips n triknya.
mampir balik ya mas bos ke http://metal-arch.blogspot.com
mantap tutornya mas..
tengkiu...
To I-Om :
kalau javascriptnya telanjang gitu browser akan loading lebih lama, tambah lelet blognya. Coba untuk di kasih ke external host sehingga loading blog lebih cepat.
Sebenarnya ini yang saya cari..
tapi setelah saya praktikkan di template blog saya, gak berhasil...ada cara lain Om??
Posting Komentar
Silahkan tinggalkan komentarnya...