Ads 468x60px

Pages

Sunday, January 7, 2007

Newer Article link, Home link, Older Article link, at bottom of every post

I did a post How to have Previous and Next links at the bottom of every posts. Actually it should be titled "How to have NEWER POST, HOME, OLDER POST links at the bottom of the post" as that is what I have decided to do for this blog.

I have decided to redo the post for the following reasons"

1. I used tables for this blog. A reader commented he didn't like tables
2. Another reader asked how she can have the title of the posts rather than NEWER POST and OLDER POST in the links. It is very hard to answer in the comments, so I promised to answer in a new post.
3. I did not describe how I easily obtained the links to put in the codes for the links.
4. old (classic) Blogger is being phased out, and is being replaced by the New Blogger (formerly beta) blogs. This will be good for those without any HTML knowledge and don't want to tangle with it. However, I am betting that there will be a few die-hards who will want to stick to the old (classic) template, as with a little HTML knowledge, it is easier to have better control over the "look and feel" of the blog. This hack, for example, will be with 2 types of links in the new Blogger. The links as a result of this hack and the NEWER POST | HOME | OLDER POST that is automatically put there by the New Blogger.

So here I am doing a new post. First, look at the result of what I will be describing in this post: The Mayo Clinic diet and the 7 rules of dieting. You will see both what we are trying to achieve in this post (at the bottom of the post) and what is put there automatically (NEWER POST | HOME | OLDER POST at the bottom of the comments (That is a New Blogger Blog). Click on the links and see how it works.

Method

If that is what you want, this is what you need to do. Sign into Dashboard, select the blog, click SETTINGS > FORMATTING, then at the bottom of the page, in the box for the Post Template, add this into the box:

<a href="Newer Article URL">Newer Article title</a>special character for HTML non-breaking space|special character for HTML non-breaking space<a href="Main page URL">Home</a>special character for HTML non-breaking space|special character for HTML non-breaking space<a href="Older Article URL">Older Article title</a>


Note that special character for HTML non-breaking space is an image, not a text, so if you are copying the codes from the box above, you will have to manually type in the character, which is the HTML for a non-breaking space to put some space between the links. Now each time you create a post, the codes will be included in your post, and you have to do is to substitute the New Article URL with the actual URL of the new article, the Main Page URL with the actual URL of your main page (this is better done in the post template, so that you don't have to do it each time you do a new post), the Older Article URL with the actual URL of the older article, and the Title of the Older Article with the actual article of the older article.

How to get the URL's and the titles

I would suggest that if you do not already have FireFox browser installed in your computer, you download it from this site: FireFox Alert or direct from this blog by clicking on the "Get FireFox with Google toolbar for better browsing" link at the top of the right sidebar. This is because FireFox has tabbed browsing and will help you greatly in this task.

Now when you modify the codes given in the above box, you will need the post URL and title. The easiest way to do this is the following. Assuming you are still in the post editor and using the FireFox browser, middle click on the EDIT POST tab at the post editor (or right-click and select "Open in New Tab"). A list of all your post will appear in the new tab in the same window. To get the URL of the relevant post, right-click on the VIEW link and select "Copy Link Location", then go back to the post editor tab, and paste the URL in the relevant place. Regarding the post article title, you can either refer to the title in the list of posts and manually type in the post title, or if you want to copy-paste, right-click on the VIEW link and choose "open in new tab", then in the new tab, just highlight the title, return to the post editor tab and paste in the post article you have copied.

Since in your previous post, you don't have a NEWER POST and likely didn't put in the link for the latest post, click EDIT POST and the list of post including your latest post will appear. Right click on the VIEW tab against your latest post, click EDIT against the previous post, then add in the link (and also add in the new title) in the post editor, then publish.

If you already have a lot of posts, and you want to do it for each post, then copy the above code, substitude the Home URL with the actual url of your main page, then copy again. This is so that you don't have to do it in each post. Click EDIT against those old posts you want to add the link, , paste the modified codes at the bottom of the post and repeat the process described above.

Now if you understand what is going on, you will be able to modify my instruction to do whatever you want done. If you still have questions, put them in the comments and I will try my best to answer.

  NEWER POST    HOME  OLDER POST

0 comments:

Post a Comment