Monday, December 13, 2004

How to add links to your Blogger sidebar

I'm going to borrow a bit from the Blogger help section to put this up, but it's a fairly easy procedure. It uses HTML, so if you don't understand it, just rest assured that it will work if you type it up properly. (using one of the first things I learned in computer science here, don't bother understanding why it works, just do it)

Wherever there's an HTML tag, it goes in angle brackets < >. If I type those in here, Blogger will put the tag into my post, so I won't be able to type them in. Instead I'll be using regular brackets ( ). So when you're doing your own links, replace all my brackets with angle brackets, and you'll be golden.

First off, you'll need to be in your Blogger settings. You can get there from the Dashboard, or by just clicking on your blog name when you log in. From there click on the Template tag.

You should see a text box full of code. It'll probably all be gibberish to you, but that's what makes your blog look like it does. Don't mess with it, just scroll through it until you see a heading that says (!--begin #sidebar). It'll have the sections for your recent posts and archives. Underneath all those, write a new header that says "Links" or whatever you want it to say. You should put in the same (h#) tag that appears on the other sections. This will turn it into a header, and give it the same size, boldness, and spacing as the sections that already there. For my template it's an (h2) tag, but yours might be different. Make sure you close this tag (/h2) or else everything will be written as a header. The bigger the number in the (h#) tage, the smaller the header. You have (h1) through (h6) to choose from.

After that's done, you just need to start a list with the (ul) tag, then make a list element, (li), for each link. For the links themselves, you'll need to use the HTML code (a href="http://www.linkaddress.com")Link Name(/a), then close the list element, (/li). If you want your link to open in a new window like mine do, put target="_blank" in the (a) tag after the address. So that would be (a href="http://www.linkaddress.com target="_blank)Link Name(/a). The underscore before blank is very important, so don't forget it.

Add as many links as you want, making each a list element with the (li) and (/li) tags, and when you're done, close the list with the (/ul) tag.

So, as an example, here's what you should have if you're following my directions to the letter.

(h2)Links(/h2)
(ul)
(li)(a href="www.linkaddress.com" target="_blank")Link Name(/a)(/li)
(/ul)

And there's your links section. Don't forget to change the brackets to angle brackets.

If you want to put in a link to send you email, use (a href="mailto:you@whatever.com")Email(/a).

Before you save your template, make sure you preview it to check for tags you might have missed or forgotten to close. The preview will look funny (all the text will be too big), but don't worry about it, it'll look right when you save it.

This post is dedicated to Margot and Greg, both of whom asked about this.

0 Comments:

Post a Comment

<< Home