Showing posts with label Dragons Alley. Show all posts
Showing posts with label Dragons Alley. Show all posts

Thursday, September 1, 2011

How To Make Links Open In A New Widow On Blogger



Just a few days ago, I was seriously considering going into crisis mood.  You can read all about [here].

At the end of the article, I mention that WordPress does have one big advantage over Blogger, and that is the ability to open links in a new window.  Well, I just found out how to do it on Blogger, as well.

Grace, of [Dragon’s Alley] fame and fortune came to my rescue at first.  For she found how to do it with individual links, which you can read about [here], and after being absolutely overjoyed over this, I found a way to make ALL links open in a new window automatically.

Now, I am somewhat reluctant to give this person credit.  For when I asked him for some help with this several months ago, he ignored me, and since he had already published an article about it, all he had to do was direct me to it.

Anyway, whether a jerk or not, credit should be given when due, and you read what he wrote [here].  Ironically, if you click on the links in his article, they do not open in a new window, but the code he provides works on all of my sites now.  In all fairness, Google has been making some drastic changes to Blogger, and it may very well be that he just needs to enter it again.

In order to make it a little easier on you (hopefully), a step-by-step guide is below.  Please, make sure and download a copy of your current template to your hard drive, just in case something goes wrong.  It shouldn’t, but…

Step 1: Go to your Blogger Dashboard.

Step 2: On Blogger-In-Draft, you will see an image that looks like a couple of pieces of paper, and just to the right of it, you will see an arrow for a drop-down menu.  Click on “Template” on the drop-down menu.

Step 3: Click on “Edit HTML” under “Live on Blog.” After doing so, you should see something like the following in the box under “Template > Edit HTML.”
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html expr:dir='data:blog.languageDirection' xmlns='http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr'>
  <head>

Step 4:  What you are seeing is the first few lines of code to your template, and under <head>, paste (or manually type in) <base target='_blank' />  After doing so, your code should look like the following:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html expr:dir='data:blog.languageDirection' xmlns='http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr'>
  <head>
  <base target='_blank'/>
Note: I don’t know if it is really necessary, but I added a couple of spaces to the front of <base target… so that it would line up with <head>.

Step 5: Click on “Save Template” at the bottom and to the right of the box.

Step 6: After the template has updated, which should only take a few seconds, click on “Close” to the left of “Save Template.”

Step 7: Open a page on your site, and marvel at what a technical genius you are after seeing your links open in a new window!  (That is, until Google decides to make some more “improvements,” of course.)

Please Also Visit:
and