To see if I can get this partial post thing enabled. The damn Blogger help is such a tease: Modifying this feature is left as an exercise for the reader.
((Don't be content with only a teaser of this post; read more of this musing.))
That's BS! I want the f*cking answer, damnit.
Here's the Blogger help post:
How can I create expandable post summaries?And then the help page goes on to provide the code. You know, blah, blah, blah.
With this trick, you can choose to display an arbitrary amount of text from the beginning of each post, as a teaser for the whole thing. Then users who want to read the rest of the post can click a link to see the full text. This is handy if you have lots of long articles all on one page. Note that you'll need to have post pages enabled in order to make this feature work.
There are three ingredients that go into this feature: conditional CSS, a "read more" link for each post, and a modification for the posts that use this feature. So let's go through it step by step.
We're going to use conditional tags to change how posts display on different pages. Add the following code to your style sheet:
So I do it, before reading the notes at the end.
Thanks, guys. That's really helpful.
- As with any template modifications, you should be sure to save a backup copy of your template before you start. Just copy and paste all your code to a text file on your hard drive, so you'll have it there as a replacement in case anything goes wrong.
- An alternative to creating post excerpts like this is to use the show/hide method on entire posts. Each method has its own advantages and disadvantages.
- Advantages to this method: Customizable summaries, rather than titles only. Can be applied to some posts and not others (for instance, you might only want this for your longer posts).
- Disadvantages: Requires changes to the posts themselves, rather than to the template only. However, the "read more" link is in the template, so it will appear regardless of whether a post has been truncated or not. (Modifying this feature is left as an exercise for the reader.)