Capitalmind
Capitalmind
Actionable insights on equities, fixed-income, macros and personal finance Start 14-Days Free Trial
Actionable investing insights Get Free Trial
Commentary

"Older Posts" in my Blogger Template

Share:

This has been ticking me off for a while. I use Blogger “templates” and not “Layouts”, and there has never been the ability to create an “older posts” link (meaning, going back to the earlier set of posts, when trying to navigate this blog chronologically).

So my techie brain refused to get cowed down by the apparent lack of predefined support – and I had to do some heavy lifting myself. After running through Javascript, the “Date” object, three different browsers (IE, Chrome and Firefox) and thanking the flying spaghetti monster for FireBug, I have finally managed to get this “older posts” link working. Or so I think.

For the tech-inquisitive, the idea is to use a search URL with “updated-max” as the last post on a particular page. Store the least blog post date, convert to RFC 2533, create an anchor link with the right URL (must retain label information here), and populate it into a DIV. You can see the source code at the very bottom of the page’s source.

For the tech-non-inquisitive, sorry.

This is a major breakthrough for me. I have not coded javascript in a while and I’m so totally kicked I did something. Comments are appreciated, even those that ask me what I’ve been smoking.

Share:

Like our content? Join Capitalmind Premium.

  • Equity, fixed income, macro and personal finance research
  • Model equity and fixed-income portfolios
  • Exclusive apps, tutorials, and member community
Subscribe Now Or start with a free-trial