Pages

Thursday, November 09, 2006

Blogger Beta Hack - Expandable post entry

This is a very useful hack. The purpose of this hack is to display only the summary of your full article / story on the main page. When reader click the "read more" it shows the full article on the next page.

To me it is so important and I hope that Blogger Beta should add this feature ASAP, but I simply just can't wait. I've done it in previous Blogger build, so I look around and I found a Blogger user that dedicate himself to hack Blogger. Thanks Ramani (I think he is from India).

Anyway here are the steps.

  1. 1. Search for "post-header-line" to find this portion of code in your template and add the lines in as shown below.

    <div class='post-header-line-1'/>
    <div class='post-body'>
    <b:if cond='data:blog.pageType == "item"'>
    <style>.fullpost{display:inline;}</style>
    <p><data:post.body/></p>
    <b:else/>
    <style>.fullpost{display:none;}</style>
    <p><data:post.body/></p>
    <a expr:href='data:post.url'>Read More......</a>
    </b:if>
    <div style='clear: both;'/> <!-- clear for photos floats --> </div>

  2. (optional step) Goto Settings->Formatting. At the bottom, you will find the text box provided to specify the "Post template". Copy/paste these lines into that text box and save the settings.
    Type your summary here

    <span class="fullpost">
    Type rest of the post here
    </span>
Voila, now every time you want to create a post, "Type your summary here" and "Type rest of the post here" will be display. Just replace it with your entry.

With all the fuss you will be rewarded with at least double page views in your blog stats. Just make sure you don't reveal everything in the blurb.

No comments: