How to Numbered Page Navigation as Autoindex in Blogger

Page Navigation is a really awesome and long awaited feature. You might have seen numbered page navigation on many wordpress blogs(wp-pagen...

Page Navigation is a really awesome and long awaited feature. You might have seen numbered page navigation on many wordpress blogs(wp-pagenavi by Lester Chan). Muhammad Rias of Techie Blogger had already developed a page navigation system for blogger.It really was an awesome trick which was made at a time when nobody could even think of implementing it on blogger.It had some minor bugs and now Abu Farhan has perfected it and he has now given us the perfect page navigation solution.Here is a little screenshot of what this is all about.

 When you use this hack,you will see this kind of navigation on your blog’s home page and label pages(needs little customization).
Implementation of Blogger Page Navigation

1.Login to Blogger Dashboard and navigate to Layout > Edit Html
2.Don’t click the checkbox which says ‘Expand Widget Templates’
3.Now find

]]></b:skin>
and replace it with


.showpageArea a {
text-decoration:underline;
}
.showpageNum a {
text-decoration:none;
border: 1px solid #cccccc;
margin:0 3px;
padding:3px;
}
.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:3px;
}
.showpageOf {
text-decoration:none;
padding:3px;
margin: 0 3px 0 0;
}
.showpage a {
text-decoration:none;
border: 1px solid #cccccc;
padding:3px;
}
.showpage a:hover {
text-decoration:none;
}
.showpageNum a:link,.showpage a:link {
text-decoration:none;
color:#333333;
}
]]></b:skin>
 This is the CSS part which defines the look and feel of the page navigation.You can modify it according to your need

4.Next is the JavaScript part. Find
</body>
and replace it with 

 <!--Page Navigation Starts-->
<script type='text/javascript'>
var pageCount=6;
var displayPageNum=6;
var upPageWord ='Previous';
var downPageWord ='Next';
</script>
<script type='text/javascript'>
//<![CDATA[
function showpageCount(n){var h=home_page_url;var f=new Array();var m=1;var c=1;var q=0;var s=0;var d=0;var e="";var a="";var o="";for(var l=0,k;k=n.feed.entry[l];l++){var r=k.published.$t.substring(0,19)+k.published.$t.substring(23,29);timestamp=encodeURIComponent(r);var t=k.title.$t;if(t!=""){if(q==0||(q%pageCount==(pageCount-1))){if(h.indexOf(timestamp)!=-1){m=c}if(t!=""){c++}f[f.length]="/search?updated-max="+timestamp+"&max-results="+pageCount}}q++}for(var g=0;g<f.length;g++){if(g>=(m-displayPageNum-1)&&g<(m+displayPageNum)){if(s==0&&g==m-2){if(m==2){a='<span class="showpage"><a href="/">'+upPageWord+"</a></span>"}else{a='<span class="showpage"><a href="'+f[g]+'">'+upPageWord+"</a></span>"}s++}if(g==(m-1)){e+='<span class="showpagePoint">'+m+"</span>"}else{if(g==0){e+='<span class="showpageNum"><a href="/">1</a></span>'}else{e+='<span class="showpageNum"><a href="'+f[g]+'">'+(g+1)+"</a></span>"}}if(d==0&&g==m){o='<span class="showpage"> <a href="'+f[g]+'">'+downPageWord+"</a></span>";d++}}}if(m>1){e=""+a+" "+e+" "}e='<div class="showpageArea"><span style="COLOR: #dad8d7;" class="showpageOf">Pages ('+(c-1)+")</span>"+e;if(m<(c-1)){e+=o}if(c==1){c++}e+="</div>";var b=document.getElementsByName("pageArea");var j=document.getElementById("blog-pager");if(c<=2){e=""}for(var g=0;g<b.length;g++){b[g].innerHTML=e}if(b&&b.length>0){e=""}if(j){j.innerHTML=e}}function showpageCount2(r){var l=home_page_url;var k=new Array();var g=l.indexOf("/search/label/")!=-1;var d=g?l.substr(l.indexOf("/search/label/")+14,l.length):"";d=d.indexOf("?")!=-1?d.substr(0,d.indexOf("?")):d;var q=1;var e=1;var t=0;var v=0;var f=0;var h="";var a="";var s="";var c='<span class="showpageNum"><a href="/search/label/'+d+"?&max-results="+pageCount+'">';var l=home_page_url;for(var o=0,n;n=r.feed.entry[o];o++){var u=n.published.$t.substring(0,19)+n.published.$t.substring(23,29);timestamp=encodeURIComponent(u);var w=n.title.$t;if(w!=""){if(t==0||(t%pageCount==(pageCount-1))){if(l.indexOf(timestamp)!=-1){q=e}if(w!=""){e++}k[k.length]="/search/label/"+d+"?updated-max="+timestamp+"&max-results="+pageCount}}t++}for(var j=0;j<k.length;j++){if(j>=(q-displayPageNum-1)&&j<(q+displayPageNum)){if(v==0&&j==q-2){if(q==2){a=c+upPageWord+"</a></span>"}else{a='<span class="showpage"><a href="'+k[j]+'">'+upPageWord+"</a></span>"}v++}if(j==(q-1)){h+='<span class="showpagePoint">'+q+"</span>"}else{if(j==0){h=c+"1</a></span>"}else{h+='<span class="showpageNum"><a href="'+k[j]+'">'+(j+1)+"</a></span>"}}if(f==0&&j==q){s='<span class="showpage"> <a href="'+k[j]+'">'+downPageWord+"</a></span>";f++}}}if(q>1){if(!g){h=""+a+" "+h+" "}else{h=""+a+" "+h+" "}}h='<div class="showpageArea"><span style="COLOR: #dad8d7;" class="showpageOf">Pages ('+(e-1)+")</span>"+h;if(q<(e-1)){h+=s}if(e==1){e++}h+="</div>";var b=document.getElementsByName("pageArea");var m=document.getElementById("blog-pager");if(e<=2){h=""}for(var j=0;j<b.length;j++){b[j].innerHTML=h}if(b&&b.length>0){h=""}if(m){m.innerHTML=h}}var home_page_url=location.href;var thisUrl=home_page_url;if(thisUrl.indexOf("/search/label/")!=-1){if(thisUrl.indexOf("?updated-max")!=-1){var lblname1=thisUrl.substring(thisUrl.indexOf("/search/label/")+14,thisUrl.indexOf("?updated-max"))}else{var lblname1=thisUrl.substring(thisUrl.indexOf("/search/label/")+14,thisUrl.indexOf("?&max"))}}var home_page="/";if(thisUrl.indexOf("?q=")==-1){if(thisUrl.indexOf("/search/label/")==-1){document.write('<script src="'+home_page+'feeds/posts/summary?alt=json-in-script&callback=showpageCount&max-results=99999" ><\/script>')}else{document.write('<script src="'+home_page+"feeds/posts/full/-/"+lblname1+'?alt=json-in-script&callback=showpageCount2&max-results=99999" ><\/script>')}};
//]]>
</script>
<!--Page Navigation Ends -->
</body>


As you can see,there are some customizable parameters in this codevar pageCount=5;

This code determines the number of posts that would be displayed per page.var displayPageNum=5;

This code determines the number of additional page navigation numbers that will be displayed on the page.var upPageWord =&#39;Previous&#39;; var downPageWord =&#39;Next&#39;;

These two lines determine the text that would be shown for the previous page and next page respectively.

Label Fix

Now we have another problem.By default,the blogger label pages will show 20 posts.We will have to cut this down to the value that we gave for the variable pageCount (or the posts per page).For this we will have to edit our template

How to Edit the template to cut short the posts per page?

Go to the Edit HTML page and expand the Widget Templates
Now find each occurrence of
'data:label.url'
(including the quotes) and replace each of it with
'data:label.url + &quot;?&amp;max-results=5&quot;'
Here 5 is the number of posts to be displayed per page.
Now if you are using the label cloud widget by phydeaux3,then find
a.href = &#39;/search/label/&#39;+encodeURIComponent(t);
and replace it with




a.href = &#39;/search/label/&#39;+encodeURIComponent(t)+&#39;?&amp;max-results=5&#39;;


Here also 5 is the number of posts to be displayed per page.
Now you should have the Blogger Page Navigation working perfectly on your blog. :)










COMMENTS

BLOGGER
Name

Acronyms,1,Ads Ready,1,Adsense,1,Adserver,1,airtel,2,android,22,Apps,4,Auto Loader,19,backup,1,Bank,1,BB10,1,better,1,bios,1,blackberry,24,Blogger,11,blogger jquery,12,Blogger Template,3,blogger tips,12,Blogger Widget/Gadget,13,Bluetooth,1,BOIS Update,1,browser,2,Bug,1,business,3,CAD,1,capability,1,Career Development,2,Celebrate,1,chat,1,cloud computing,1,code,1,comment,2,computer,13,crack,17,crash,1,css,3,cure,1,CV,18,data,2,delete,1,Diamond Bank,2,download,32,email,6,ESPN,1,etisalat,2,Facebook,2,Feedburner,1,Firmware,3,Flash File,27,Flash Games,3,Flashing,3,For Seniors,2,free-up space,1,Freebies and Giveaways,2,FTP,1,Galaxy,2,games,5,glo,2,good,1,Google,8,Google Affiliate,1,Google Drive,1,Google Photos,1,Google Play Store,3,Google+.,1,great,1,GTA,4,guide,3,hacks,7,handle,1,Hard drive,2,HDD,1,how to,10,HTC,2,html,1,Huawei,1,ict,4,India,1,INEC,1,Infinity Best,1,Innovation,1,Intel,1,internet,6,internet explorer,1,iOS,2,ipad,4,iphone,7,Itel,1,java script,6,Jetpack,1,keyboard,8,know,3,Label,3,Laptop,1,Learning,12,LG,2,Lollipop,2,Mac,2,Management,1,Marriage,1,Mediafire,1,meeting,1,message,12,Microsoft,5,Microsoft excel,2,mobile,7,Mobile Phones Specifications,1,mobility,2,money,1,Motorola,1,Movie,1,Mozilla Firerfox,1,MS Word,1,MTK,2,mtn,4,music,1,need,1,Networking,1,NOBLE NOKIA INFO,9,Nokia,4,notebook,1,passwords,1,PayDirect,1,PayPal,1,PC,7,PC Games,45,PC mgazine,6,PC Tricks,3,pc-crash,1,PDF,1,Personal Productivity,4,Phone,3,photo shop,1,Play Station,9,Plugin,1,post,2,Premium Blogger Template,1,protect,3,ProtectTool,1,Racing Game,2,reasons,1,Responsive,1,Root,2,sagem,1,samsung,11,save,1,secrets,1,secure,4,security,9,security Enhancements,5,Server,1,shell-coding,1,shortcut,21,Simple Server,1,SmartsmsSolutions,2,SMS,6,social community,3,Sony,2,Spreadtrum,1,SSD,1,steps,1,Stock Rom,2,Symbian,1,Sync,2,Tablet PC,3,Talent,1,TECH_WORLD,2,Techniques,3,technology,3,technology tips,26,Tecno,7,template hacks,1,Theme,1,tips,19,transmissions,1,Tutorial,3,tutorials,28,types,1,USB Driver,1,users,1,Video,1,Virus,1,Visa Card,1,Volcano Box,8,Vote,1,WAP WORLD,8,Whatsapp,1,windows,11,Windows 10,2,Windows 7,1,Windows 8,1,windows mobile,1,Windows Phone,2,Windows Phone Store,2,windows xp,5,word of life,11,Wordpress,3,work place skills,7,WPTouch Mobile Plugin,1,Xbox,2,zain,1,Zenith Bank,1,
ltr
item
NOBLE ICT EXPLOITS ZONE™: How to Numbered Page Navigation as Autoindex in Blogger
How to Numbered Page Navigation as Autoindex in Blogger
http://4.bp.blogspot.com/-ty5RWF_rtXc/UDWoQ1NRzQI/AAAAAAAAAgY/V-Kf6SwtESI/s1600/numbered-page-navigation-for-blogger.png
http://4.bp.blogspot.com/-ty5RWF_rtXc/UDWoQ1NRzQI/AAAAAAAAAgY/V-Kf6SwtESI/s72-c/numbered-page-navigation-for-blogger.png
NOBLE ICT EXPLOITS ZONE™
https://naijaexploits.blogspot.com/2012/08/how-to-numbered-page-navigation-as.html
https://naijaexploits.blogspot.com/
https://naijaexploits.blogspot.com/
https://naijaexploits.blogspot.com/2012/08/how-to-numbered-page-navigation-as.html
true
4058378300189517969
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS CONTENT IS PREMIUM Please share to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy