Monday, March 7, 2011

Class Blogging Tips and Tricks: How to open link in a new window

The emergence of blogging services like Blogger and Wordpress has made blogging a very easy experience. A lot of teachers have started to blog in search of finding new ways to make students become more active in the language learning process. Teachers blog to share resources, videos, pictures and all kinds of information with their students and the rest of the world. All of this makes blogging a rich experience both for the teacher and the student.
With these posts, I want to share my solutions to little problems that our teachers have encountered during their blogging experience. I am sure that others out there had the same problems and are looking for ways to solve them. Well, here they are:

One recent problem that teachers encounter with their blogs is with Blogger's "link list" gadget. They use this gadget to provide students with useful links such as dictionaries, video sites, or grammar and vocabulary sites. However, their complaint is that whenever the students click the links, the sites open in the same window instead of opening in a new window. The same is valid for links that are given in a blog post. They, too, open in the same window instead of opening in a new one. Obviously, teachers want their students to continue reading their blogs while browsing dictionaries or other reference sites. Unfortunately, Blogger does not have a setting where you can enable such a feature. After extensively searching the internet, I have found the solution to both of the problems. Both can be solved by making little changes to the HTML code:

1. Open link in new window in a blog post:

First write your message in compose mode and include your link (click image to enlarge):

Then switch to "Edit HTML" mode. Now write target="new" after the link (don't forget to put a space). Below you will find a before and after screen shot (click images to enlarge):

Before and After HTML Code.

After you publish your post, you will see that the link opens in a new window. Don't forget that you have to apply this to all of your individual posts.

2. Open link in new window in a link list gadget:

This is a little bit complicated. You have to follow all instructions step by step without skipping one.  In the "Design" tab, add the "link list" gadget and do not forget to give it a title. In our case, it is "Dictionaries". Then, click the "edit HTML" tab on the same page (be sure you clicked "save" after you have added your gadget").

Add gadget

Now, before making any changes, you can "download the full template" in case something goes wrong (which I doubt) and you want to keep your original blog template.  Next, click "Expand Widget Templates", so that the specific gadget templates can be seen. Now press ctrl F (search) on your keyboard and search for "" (without the quotation marks). When you have found the search term, you will notice that a few lines earlier, it says "widget ID" and on the same line "Dictionaries". That was the title that I gave for my link list. If you see these, that means you are on the right track.

Search for

The next step is to write target='_blank'  after <li><a expr:href='' (before the bracket). So your new line should look  like this (don't forget to put a space before your your new code):

<li><a expr:href='' target='_blank'><></a></li>

Insert "target='_blank"

Finally, click save template and then view your blog. Now, when any link in your link list is clicked, a new window will open. All of this sounds complicated, but it is not. Once you have tried it, you will see that it is quite easy and feel like you have become a webmaster (I did!!) after seeing that it works...


Post a Comment