Stupid Blogger Tricks
My posts vary in length quite a bit. Sometimes they are really long-winded tirades, and other times they are just short meaningless outbursts. One thing that always bugged me about blogger was that there didn't seem to be any easy way to create a post that showed only the intro, and then a link you could click to see the full post if you were interested. I found some solutions in the blogger FAQs but didn't find them satisfactory. If you're looking for the same kind of thing I was, read on.
Searching blogger's help I could only really find two ready made solutions: this one and this one. The second solution was closest to what I wanted, and I used it for awhile, but there were two things I didn't like about it. First, the "Read Full Post" link would have to appear on every post, no matter how long or short it was. As you see near the end of the article, the ability to selectively apply it to individual posts was left as an exercise to the reader. Nice. Second, it required you to load a completely new page. I really wanted something that would just hide the text and expand it inline.
Well, one night this started really irritating me, and I finally came up with the following solution. It may not be optimal, but it works and does what I want it to. Change your blogger posting template to something like the text below. Then, when you create a new post, you edit what's there by putting your introductory paragraph, summary, or whatever where it says "Intro goes here ...". And, as you might guess, put the rest of your post in the section that says "Extended post goes here ...".
The only other thing, which admittedly is a bit of a nuisance, is that you should change the two instances of "postname" to some unique identifier for that particular post, so that you don't have overlapping spans.
I know this isn't exactly genius, especially for anyone who's done a lot of hand-coding of HTML, Javascript and CSS (that does not, unfortunately, describe me!). Sometime when I run out of other things to do, I'd like to tweak it a little, for example, I'd like to make it a toggle instead of having it completely disappear.
I thought I'd post it anway in case some other frustrated blogger out there might find it useful.
Example posting template:
First, add this somewhere in the style section of your template (the main template, not the posting template):
Then edit your posting template to look something like this:
Read Full Post
Searching blogger's help I could only really find two ready made solutions: this one and this one. The second solution was closest to what I wanted, and I used it for awhile, but there were two things I didn't like about it. First, the "Read Full Post" link would have to appear on every post, no matter how long or short it was. As you see near the end of the article, the ability to selectively apply it to individual posts was left as an exercise to the reader. Nice. Second, it required you to load a completely new page. I really wanted something that would just hide the text and expand it inline.
Well, one night this started really irritating me, and I finally came up with the following solution. It may not be optimal, but it works and does what I want it to. Change your blogger posting template to something like the text below. Then, when you create a new post, you edit what's there by putting your introductory paragraph, summary, or whatever where it says "Intro goes here ...". And, as you might guess, put the rest of your post in the section that says "Extended post goes here ...".
The only other thing, which admittedly is a bit of a nuisance, is that you should change the two instances of "postname" to some unique identifier for that particular post, so that you don't have overlapping spans.
I know this isn't exactly genius, especially for anyone who's done a lot of hand-coding of HTML, Javascript and CSS (that does not, unfortunately, describe me!). Sometime when I run out of other things to do, I'd like to tweak it a little, for example, I'd like to make it a toggle instead of having it completely disappear.
I thought I'd post it anway in case some other frustrated blogger out there might find it useful.
Example posting template:
First, add this somewhere in the style section of your template (the main template, not the posting template):
<style>span.hiddenspan {display:none;}</style>
Then edit your posting template to look something like this:
Intro goes here ...
<span id="postname" class="hiddenspan">
Extended post goes here ...
</span>
<a href="#anchor" onclick="javascript:{document.getElementById('postname').style.display='inline';this.style.display='none';};">Read Full Post</a>
<span id="postname" class="hiddenspan">
Extended post goes here ...
</span>
<a href="#anchor" onclick="javascript:{document.getElementById('postname').style.display='inline';this.style.display='none';};">Read Full Post</a>
Read Full Post
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home