Wednesday, March 17, 2010

How to have expandable post in blogger.

Step 0: Download and save your template so that you can go back to it if there is any problem with this hack (Important!)




Step 1: Find the



tag in your template and add all the code from this page before it.



Step 2: Find the includable called 'post' and copy/paste the changes highlighted in red in this page (Be very careful and avoid mistakes. Note that the word "uncustomized-post-template" may not appear in your template but that's fine.). To find the includable, you could search for the term id='post'. If you are not able to find it, you may not have expanded the template. Select the checkbox named "Expand Widget Templates", which is right above the template code, to expand it into more code.



Step 3. Goto Settings->Formatting and 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. (Please DON'T type these lines yourself because you might introduce some spaces that will break the functionality)



Type your summary here



Type rest of the post here





If you create a new post now, it shows you clearly where to type the summary and where to add the rest of the post. It is important to make sure that the /span tag above is at the end of the post. To ensure this, use Edit Html tab instead of Compose tab while typing the post. After typing, you can go to compose mode and change fonts/colors etc. Please note that you could also divide some (or all) of your old posts into summary and full post by editing them. The "Read more" link will appear only for the posts that have been divided like this.



[If you are visiting my blog for the first time, don't miss these other nice things I offer:

1. A Digg-like blog sharing website to promote your blog - bvibes.com.

2. AJAX-driven fast template - Neo ]



Important notes:

Note 1: Please don't forget to add a link to Hackosphere in your sidebar. That's the only thing I am expecting in return :)

Note 2: If you would like some fade in/fade out special effect for this hack, you can have it by making the few changes described in this other post.

Note 3: If you would like the "Read more" link to take you to the post page instead of expanding in the main page itself, use this other hack.

Note 4: If you click "Older posts" link, the "Read more" link may appear even for the posts which you haven't divided into summary and full post. This is a known problem which we haven't solved yet.

No comments: