Monday, April 12, 2010

Classic (HTML) Templates Get A New Lease On Life

As a result from a few (justified) complaints about Auto Pagination and its effects on blogs with classic (HTML) templates, Blogger has released an enhancement which will make classic templates, in general, more usable.

In Creating pagination links on Classic Templates, we see two new options for classic templates.
If you are using Classic Templates and would like to add pagination links to your blog, there are currently two options for setting this up. Both involve adding a snippet of code to your blog's template, which can be done from the Template | Edit HTML tab.

You even have the ability to customise the link caption, with the phrase of your choice, or even a graphic - as you can see on some of my blogs.
  • "<$BlogPaginationLinks$>" (for language automatic, "Older / Newer" captioned links).
  • "<$NewerPosts$>" / "<$OlderPosts$>" (for manually labeled custom captions).


Anybody with a blog with a classic template will enjoy using these options, and especially those with blogs subject to unwanted display segmentation. You may see my initial test, in my Classic Template Laboratory. Here's my implementation, with copious amount of detail removed.
<!-- Begin #main -->
<div id="main"><div id="main2">

<Blogger>

<BlogDateHeader>
<h2 class="date-header"><$BlogDateHeaderDate$></h2>
</BlogDateHeader>

<!-- Begin .post -->

...

<!-- End .post -->

<!-- Begin #comments -->
<ItemPage>

...

</ItemPage>

<!-- End #comments -->
</Blogger>
</div>
<$BlogPaginationLinks$>
</div>
<!-- End #main -->

You need to insert the extra code at the very end of the "main" section. Note that precise placement, after the right "</div>", is essential.

You'll note that neither "<$BlogPaginationLinks$>" nor "<$NewerPosts$>" / "<$OlderPosts$>" provides the exact functionality of the links that are built in to designer / layout templates. If you want full functionality, you have to upgrade. Fortunately, since FTP Publishing was terminated, there is no real need to remain with classic templates.

>> Top

6 comments:

Marf said...

That might have been quite useful to me if they weren't doing away with ftp publishing. I've been wanting to host my blog on my own servers, but the lack of Pagination in classic templates is one of the things that had stopped me.

Now that they're doing away with FTP publishing, I don't see much of a reason to use classic templates at all.

Johnny Hoang said...

thanks for posting this. my blog was missing the older/newer button.

Heidi said...

I tried this, in what I think was exactly the right spot and it ended up on the top towards the right of my blog, vs. the bottom. There is only one place in my template referring to the main body, so I don't know how I got it wrong, but I did get it wrong! It's a start though, to have this option. I am not too html savvy so obviously I"m missing something here.

Chuck said...

Heidi,

Getting this code in the right spot, in the classic template code, is a real challenge. It took me half a dozen tries to get it to work, on my demo template.

Just another reason why I like tweaking a designer / layout template so much more.

Heidi said...

I've tried it over 1\2 dozen times myself and NO success. For whatever reason, it ends up at the very top of my side bar instead. Consistently. Any ideas for me to try given it is being pasted into the main body, before the main body ends and the side bar begins- it's truly weird!

madeofjellyfish said...

Alas, after editing properly and previewing results, I get a "Sorry, the page you were looking for in the blog does not exist".