List the latest post Titles up to more than 1000post using RSS Feed through Yahoo Pipe.Just you need to add JavaScript and publish it.The old way is not so easy way.People show the post titles by adding link of each post Titles and publish it.But what if you got more than 1000 post.You will suffer from headache.One of the easiest way is to list using Yahoo Pipe.The content gets updated regularly.For Demo you can go this link.If you want to do so lets do it.
JavaScript Code of Yahoo Pipe for Listing Post Titles
- The JavaScript Code for listing post is given below.
<!-- Post Title Listing --> <div style="height:300px;width:500px;overflow: auto; id='listpost'"> <script type="text/javascript"> function getYpipeTL(feed) { document.write('<ol>'); var i; for (i = 0; i < feed.count ; i++) { var href = "'" + feed.value.items[i].link + "'"; var pTitle = feed.value.items[i].title; var pComment = " \(" + feed.value.items[i].commentcount + " comments\)"; var pList = "<li>" + "<a href="+ href + '" target="_blank">' + pTitle; document.write(pList); document.write(pComment); document.write('</a></li>'); } document.write('</ol>'); } </script> <script src="http://pipes.yahoo.com/pipes/pipe.run? BlogUrl=http://bloggerrounder.blogspot.com &Order=alphabet &_id=364fef2aa699b7ec391dd3c3c1c91eb2 &_callback=getYpipeTL &_render=json" type="text/javascript"></script> <span style="font-size: 80%; float:right;">Get <a href="http://bloggerrounder.blogspot.com/2011/04/listing-post-titles-in-blogger.html" target="_blank">it</a></span> </div> <!--Post Title Listing End -->
- Where,
- In Line 2 change
height:300px
andwidth:500
px to change height and width.If if don’t want to keep in scroll box then remove line 2 and line 27 - In Line 5 and Line 17 change
ol
toul
for bulleted list.If your list does not get bulleted then you need to apply css from here. - Remove Line 14 for removing comment counter.
- In Line 21 change bloggerrounder.blogspot.com with your Blog URL without including slash(/)
- In Line 22 change alphabet to chrono for listing post tiles in chronological order.
- In Line 2 change
Listing Post Title
In Static page.
- Go to Blogger Dashboard>Edit HTML>Edit Page
- Click on New Page.
- Switch to HTML mode.
- Add the List Post Title JavaScript code.
- In post Option select Ignore New Lines. If you wont the codes gets attacked by line break(
<br/>
) which result problem. - Click on Publish Button without switching to Compose Mode.
In Widget
- Go to Blogger Dashboard>Layout
- Click on Add A Gadget
- Select HTML/JavaScript
- In Content box add the “List post Title JavaScript Code”
- Click on Save Button
Styling the List.
To style the list just add CSS in Blogger HTML like this.
#listpost { /*Styling codes here*/ }
Style for adding background,border,margins,paddings etc.If you don’t know how to add CSS then you can learn from here.
Cloning the Pipe.
You can clone the pipe to be independent although pipe works smoothly but it may encounter problem so its better to clone.To clone follow this.
- Sign in at Yahoo.
- Go to This Yahoo pipe.
- Click on clone.
- After cloning copy the id of your pipe from adress at the end of your pipe URL.
- After getting The Id of Yahoo Pipe change id of our pipe in line 23 with your id.
Using Drop Menu for Listing Post Titles.
If you want to use Drop menu instead of listing them noramally the replace line 3 to line 19 of Listing post Titles JavaScript codes
<script type="text/javascript"> <!-- document.write('<select style="width:95%;" onchange="location=this.options[this.selectedIndex].value;">'); function getYpipeTL(feed) { var ddTitle = "<option>Click to chose a Post</option>"; document.write(ddTitle); var i; for (i = 0; i < feed.count ; i++) { var href = "'" + feed.value.items[i].link + "'"; var pTitle = feed.value.items[i].title; var pComment = " \(" + feed.value.items[i].commentcount + " comments\)"; var pList = "<option style='width:210px;' value=" + href + 'title="' + pTitle + '">' + pTitle; document.write(pList); document.write('</option>'); } document.write('</select>'); } //--> </script>
Where
- In
Width:95%
you can change as your taste. - You can change “Click to choose a post” as you like.
- You can remove line 15 to remove comment count.
Subscribe for free
Thanks for visiting Blogger Rounder.We can subscribe to Blogger Rounder's by RSS feed or email updates.
0 comments on "Listing Post Titles in Blogger.":
Post a Comment
We Love To Hear Comments from You.Comments are Welcome.You can comment here regarding this Post.If it is not related with the post you can ask a question by Contacting Us.Before Comment Please Subscribe To our RSS or email updates.Publishing Spam Comment is Not allowed.If you want to Add Code then Please Encode it.
Simple Tags like <a> ,<strong>,<b>,<em> and <i> are allowed for preventing spam