Thursday, November 01, 2007

Grrr argh!

I just spent the last 30 minutes or so trying to follow the directions on Blogger's help page about getting partial posts or folds activated. I followed the directions they gave with weird results. For some reason adding code to the template that doesn't involve changing the font resulted in a page with a different font size. To make this worse, the fold capability doesn't seem to work. I was hoping to post a longer thing I wrote on van Fraassen on observation, but I really don't want to if I can't break it up with a fold. Is it really this hard to get this simple functionality?

[Edit: Hat tip to Daniel for the help. I think it is kind of silly that this functionality requires the user to go in and modify their template code rather than having a built in widget or something to take care of it automatically.]

6 comments:

Daniel said...

"Is it really this hard to get this simple functionality?"

Yes. I lost at least an hour getting this to work.

Did you make sure to select "Expand Widget Templates" on the "Edit Template HTML" page?

The part of the template you need to edit is going to be hidden before you do that, and if you try to add it in manually (by just typing up another stylesheet and inserting it into the HTML Blogger displays here) it'll bug up, since the "HTML" you can see displayed there actually gets run through a few filters before Blogger actually uploads the code. I didn't have my font change, though; I had my blog fail to display at all.

Once I realized I needed to click "Expand Widget Options" though, I had no problems. Copy/paste the text Blogger Help gives in between the [head] & [/head] tags (like it tells you to), and then you can place "folds" in posts wherever you like by adding [span class="fullpost"] and [/span] tags to the post around the area you want to not show up on your main page. You'll have to add a link to the full version of the post manually, but that's not hard.

Of course, this will just make the link from your "More under the fold" link go to the top of (the full version of) your post. If you want to link to the place where the fold was inserted, you'll have to do even more template modification. (I didn't bother, so I can't help you there.) Your "Click to read more" link will also show up on the full version of the post. Again, didn't bother me enough to figure out a workaround.

I kinda wish I'd went with Wordpress. I'm sure it has its own problems, but at least they would be different ones.

Shawn said...

Brilliant! I followed your advice and got the "under the fold" link to work.

For some reason, now the conditional part isn't working and all the posts have the fold link in them, not just the ones with the bit of html calling for it. Any ideas what's up with that?

Shawn said...

I just noticed what Blogger's help page said that getting it so the fold link doesn't appear in each post: "(Modifying this feature is left as an exercise for the reader.)"

Daniel said...

The Blogger Help instructions tell you to add two bits of HTML to your template, as I recall. One of them contains the string "Read The Rest!" in it. All that bit of code does is add the "Read The Rest!" link to every post you make. The other template modification is what's defining the [span] function for "fullpost".

The solution the reader is supposed to arrive at is "Don't add the part that adds links to every post". Just insert your fold-links manually into posts that need them.

(This will require you to either guess what the URL of your post will be, or to edit your post immediately after posting it. Not hard in either case. And in the worst case scenario, when you forget to add a link at all, the reader can just click on the timestamp of a post to see the whole thing.)

Glad I could help.

Shawn said...

Ah, lovely! I'm html-challenged and misread the instructions. I'll try that. Thanks for the help!

Daniel said...

No problem.

I'm still trying to figure out how the hell to get a "Recent Comments" widget to show up on the sidebar. It's yet another area where you have to modify the HTML manually, and the functionality is kinda wonky. (It only shows comments from the posts currently on the front page, and it shows them in the order the posts are in first, then sorted by timestamp.) The instructions on the Blogger Help page seem to assume that your template assembles the page in a way that my template does not do at all; the code Blogger Help gives you would make sense if all the elements on the page were just hard-coded into their locations, but they aren't. The template has various functions which handle various bits of the page, and a function for organizing them. Which means if I want a "Recent Comments" widget, I'll probably have to write it myself.

I'm pretty sure Wordpress has it as a default widget.

I'm sure I had some reason for going with Blogger over Wordpress, but I have no idea what it was at this point.