"Murphy was an optimist!"
Trying to figure out why anchors are not working February 4, 2004 12:11 pmPosted by djuggler in : Daily Life
Ah! Got it! For some reason the blogger template has this code:
<BlogItemTitle><h2><$BlogItemTitle$><a name=”<$BlogItemNumber$>”> </a></h2></BlogItemTitle>
which makes sense but in your Settings->Formatting if Titles is set to “No” in theory this means that your anchors won’t show up which means your “perma links” won’t work.
What’s a “perma link”? Each post has a “posted by” byline and in that there is a link which shows something like “http://cursed-juggler.blogspot.com/2004_02_01_cursed-juggler_archive.html#107591112713875565” which would be the link to this post. As an example, here’s a link to my post about Eatting Spongebob Squarepants http://cursed-juggler.blogspot.com/2004_02_01_cursed-juggler_archive.html#107589435617551149
I tried turning on Titles but it didn’t seem to change anything. Perhaps I had a browser cache problem or I had not republished the template or something. However, the following change DEFINITELY works:
<a name=”<$BlogItemNumber$>”> </a><BlogItemTitle><h2><$BlogItemTitle$></h2></BlogItemTitle>
With that in place using the “#postnumber” in the url will take you to a specific post. You can confirm this by “view source” and searching for “<a name” You should have several that appear as <a name=”postnumber”> without the “#” mark.
Hope this helps someone.
Plasticbag.org Perma link origins
Blogger Knowledge Base And there it is “(This should go somewhere in your post body. If you include it in the itemtitles section, your post will only get numbered if you specify a title.)” straight from the knowledge base.