<$BlogRSDURL$>
Thursday, February 10, 2005

Columbus' Egg (post summary code)

After trying unsuccessfully this process at the
Chubloga - found via the blogger help - and this simpler one at mentoliptus - that does not work with Internet Explorer browser - , I took a bit of both and came up with this a smart-ass solution.

First always make a backup of your template... just in case you want to go back.

NOTE: I had to add a space in front of each < , delete these spaces in order to work.
ALSO NOTE: you can edit the bold parts as you please


Add this at the styles:
.fullpost {
< MainOrArchivePage>
{display:none;}
< /MainOrArchivePage>

{display:block;}
< /ItemPage>
}
.more {
< MainOrArchivePage> {display:block;font-size:85%;text-indent:0px;padding-top:3px}
< /MainOrArchivePage>
< ItemPage>
{display:none;}
< /ItemPage>
}


Between < $BlogItemBody$> and before the next < /div> add this:
< span class="more">< a href="< $BlogItemPermalinkURL$>" target="_blank" title="permanent link">< $BlogItemTitle$>< /a> < /span>


Finally, add this to your Post Template (in Settings -> publishing):
< span class="fullpost">< /span>
< span class="more">< strong>Read complete text:< /strong>< /span>


Write the part you do not want to show on the main page between < span class="fullpost"> and < /span>; and the rest either before or after.
Leave an empty line between the text and the the second span that should always be at the end of the message.

If you want to write a normal post just delete it.

The downside of this system is that you will have your post title also at the end of the posts (that's why I made the font a bit smaller than the post itself), but at least the "Read the complete text:" only appears on posts that have more to read. The Blogger solution has "Read more" in every post regardless.

To have a look on how it works visit my Portuguese blog aqui quem fala sou eu

Read complete text:

This page is powered by Blogger. Isn't yours?