Next Post Hack
Movable Type & other templates allow you to have a link bar across the top and bottom of link posts with links to the previous item and the next item in your blog, by title.
You can do this in Blogger now, too. While hacking the Kubrick template for Point-N-Click, Michael Heilemann included this very cool hack.
Code: <itempage><div align="center">« <a href="<$BlogURL$>">Home</a> <BloggerPreviousItems> | <a href="<$BlogItemPermalinkURL$>">Next: <$BlogPreviousItemTitle$></a> »</div><div style="display:none"></BloggerPreviousItems></div></itempage>
Notes:
- This line of code must be outside the Blogger tags. If you have to, close the Blogger tag (</Blogger&rt;), paste the code in, then reopen the Blogger tag.
- Right now, this will only show up on Post Pages, the pages of your individual items. To show on all pages, remove the <itempage> and </itempage> tags.
- It seems the best place for this is at the top of the posts on the page. In most Blogger templates, just before the Blogger tag is opened the first time is usually great!
9 Comments:
if you have a Next Option Hack , i can use this .. its nifty...
fantastic! Thanks...
Hello,
I have been trying to use your Previous post hack, but I am having one problem. See the code works, but my previous post section is putting my most recent post first on the list. Thus, instead of going to the next post, it goes to the current post.
Should do this:
Post A w/link to B
Post B w/link to C
But mine does this:
Post w/link to A
Post B w/link to B
- Taylor
FirstAndGold--
I looked at your site and I can't tell that you have the code on there right now. But, I am guessing what's happening is that you are showing the tool on the mainpage, not the itempages.
This works best on item pages.
Here's my code:
<itempage><div align="center">« <a href="http://templatetricks.blogspot.com">Home</a> <BloggerPreviousItems> | <a href="<$BlogItemPermalinkURL$>">Next: <$BlogPreviousItemTitle$></a> »</div><div style="display:none"></BloggerPreviousItems></div></itempage>
The other thing interesting about my page that you may not have noticed is that you can't go right to a "home" page on my site--you get immediately redirected to the first post. Here's the code to do this. It is in my template immediately after the <head> tag:
<blogger>
<Mainpage>
<script language="JavaScript">
<!--
document.location.replace('<$BlogItemPermalinkURL$>');
//-->
</script>
</Mainpage>
</blogger>
See if all of this helps!
yup you were right. the problem was main page verse post pages. you have to click once ot get to the post page then again to get to the previous post. but i can iethre do that, or use your code to force the first post to be the main page. thanks
You're linking to the previous post but calling it "next". That doesn't actually provide the functionality of having both "previous" and a "next" link the way MT handles it.
Does anyone know an easy way to do that in blogger?
I have the exact same problem as Tim Warnock describes. I want to be able to go back and forward.
This because Im putting up a photoblog with only one post per page.
If anyone have a clue, please contact me :)
Peanuts is one of the ingredients of dynamite.Contact Lenses
The only word in the English language with three consecutive sets of double letters is "bookkeeper".car insurance quotes
Post a Comment
<< Home