Saturday, September 6, 2008


The ability to display extracts of posts is a feature which many of us would love to see added to Blogger! Such a feature would prevent readers having to scroll far down the page to find the next post on home and archive pages, and in many cases, could offer the potential for different styles of layout...

Many Blogger users have adopted Ramani's selective expandable posts hack or a similar alternative. However, I have found these to be a little complicated: they require manual editing of each post or cause other irritating problems. In my search for an elegant and less cumbersome alternative, I have discovered an almost perfect solution: the jQuery Expander Plugin by Karl Swedberg.

Integrating the jQuery Expander plugin for Blogger offers many useful options and features:

* It can be added easily in only two steps!
* The length (and other options) of excerpts is completely customizable within the blog template (no need to edit JavaScript files!)
* We could choose to expand posts into the same page (with a smooth transition) or add a "read full post" link to the item page instead.
* HTML tags and complete words are preserved (unlike many forms of Wordpress excerpts)
* There is no requirement for additional tags or editing of posts: it works right away after installation!
* It's possible to use different lengths of extracts for use in magazine style layouts (I'm actually working on such a project right now...)

Depending on the style of post summaries you would prefer to display, the method for installation will be slightly different.

I'll begin with a default explanation which will summarize posts with a link to expand in the same page (this requires only two steps). Next we can make two small changes which prevent expansion and add a link to the post page.

Finally I'll explain how you can alter some options for extracts which can be applied to both methods.

For whichever function you prefer, the installation is simple and the result will be elegant post summaries for your Blogger powered blog :)


Trail Goat said...

So when are you adding javascript based expandable posts? huh? We want to know! ;-)

TonyP said...
This comment has been removed by the author.