Friday, March 23, 2007

How to make Read More in New Blogger

Do you know, the default template from blogger, we can't do an expandable post. If we have a long articles, it's a good to make it short in the frontpage.

Here is a simple tips that we can create an expandable post summaries. Just following the step below ( I have implemented in this blog):

- Login to blogger.com, then choose the blog you want to edit, click the layout then edit html.
- Don't forget to check the expand widget templates, otherwise you can't edit the full template.
- Put the following code before the </head> tag or exactly after }]]></:skin> code:

<style>
<b:if cond='data:blog.pageType == "item"'>
span.fullpost {display:inline;}
<b:else/>
span.fullpost {display:none;}
</b:if>
</style>


- You have finish the first step, next to make the post cut, find this <p><data:post.body/></p> code in your template, then add this following code after it:

<b:if cond='data:blog.pageType != "item"'>
<a expr:href='data:post.url'> Read More..</a>
</b:if>

- It's finishing for the template edit. Now, make sure everytime your post you just need to add the tag <span class="fullpost">...</span> for the article you want to be cut.

Example:

This is a simple tips for you to create an expandable posting in new blogger. Just following this tutorial step by step, this is not difficult.
<span class="fullpost">Don't forget this tutorial is for new blogger, not a classic blogger.</span>

You will see your posting like this:
This is a simple tips for you to create an expandable posting in new blogger. Just following this tutorial step by step, this is not difficult.
Read More..

Finish. Ok, see you next time...

No comments: