If you compose your blog, as I do, with lots of links to other blogs and web sites, you may make it convenient for your readers to view those other blogs or web sites then return to your blog. Instead of viewing the other blog or web site in the same window, you open the other blog or web site in a new window. When your reader finishes viewing the other blog or web site, he / she simply closes the new window. The article that he or she was reading, in your blog, is right there in front of them.
You can, similarly, do this with pictures. If you want your reader to view a picture, then return to the text in your article, you open the picture in a new window.
Instead of coding each individual link to a blog, picture, or web site, you can make all links within your blog open in a new window. Simply add a "<base target='_blank' />" to your blog, in the header.
Find
<head>
And change that to:
<head>
<base target='_blank' />
But, consider this carefully. If you construct your blog heavily using hypertext, as I construct my blogs, do you really want your readers having to close a window each time they finish reading a linked article in your blog? Do this with discretion.
While the reader is in your blog, give them one choice of what to read at any time. If they click on a link to read some detail, let them read the detail. Then, they click on the Back button, and return to where they left the previous article. Only if the reader is leaving your blog, to read another web site for detail, should you keep your blog open in the current window, and open a new window for the new web site.
Of course, if you have an insanely huge amount of links that you would like this way, maybe in a few linklists, you could host the linklists in another blog, and include the other blog in an iframe or maybe a series of posts linked to your public blog. Maybe including the iframe in your sidebar would work for you.
>> Top
You can, similarly, do this with pictures. If you want your reader to view a picture, then return to the text in your article, you open the picture in a new window.
Instead of coding each individual link to a blog, picture, or web site, you can make all links within your blog open in a new window. Simply add a "<base target='_blank' />" to your blog, in the header.
Find
<head>
And change that to:
<head>
<base target='_blank' />
But, consider this carefully. If you construct your blog heavily using hypertext, as I construct my blogs, do you really want your readers having to close a window each time they finish reading a linked article in your blog? Do this with discretion.
While the reader is in your blog, give them one choice of what to read at any time. If they click on a link to read some detail, let them read the detail. Then, they click on the Back button, and return to where they left the previous article. Only if the reader is leaving your blog, to read another web site for detail, should you keep your blog open in the current window, and open a new window for the new web site.
Of course, if you have an insanely huge amount of links that you would like this way, maybe in a few linklists, you could host the linklists in another blog, and include the other blog in an iframe or maybe a series of posts linked to your public blog. Maybe including the iframe in your sidebar would work for you.
>> Top
Comments
I implemented them successfully.
But I do have one question -- I like having most links open in new windows, but I'm not crazy about having the "Older Posts" and "Archive" links open in new windows. Is there any way to force these to open in the _same_ window? Thanks!
Sincerely,
Aaron Dalton
1GreenProduct.com
What links do you want opening in a new window? The archives links will have to have the same policy as links in the posts.
You can make a separate blog, to contain linklists and such, and have a different policy for those links, but the blog which contains the posts and the archive links has to be the same.
Right now, I suspect, you're stuck with hand coding each individual link, to have archives and posts links work differently.
Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
XML error message: The element type "base" must be terminated by the matching end-tag "".
What am I doing wrong?
Translate..
"Wah!! thankyou bro, it was hard to find to find the coding how to make it.. last time I try but it's not working because of a litle mistake"
Teachers who have little or no knowledge of html, are far better off now, then ruining my iframed website.
Thanks a lot!
I wrote a how-to aarticle on how to achieve this.
Great post btw :)
http://cyborgfrog.blogspot.com/2009/01/how-to-make-all-links-open-in-new.html
I wouldn't bet on it doing so, reliably. This change I would only test in a blog after published.
I can see 2 choices for you:
1) Reverse the change (you did backup the template I hope), and find another solution.
2) Figure out what you did wrong, and correct your mistake.
Your choice, based on your priorities.
i applied to my blogs...
We were unable to preview your template
Please correct the error below, and submit your template again.
Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
XML error message: The element type "head" must be terminated by the matching end-tag "".
I tried adding only the <{Code, apparently I can't post a comment with the correct code}> below {head} (commenting here is tough, it doesn't allow you to use any HTML code, I'm substituting parenthesis for the "<"), which made NO links click-able. I can click on anything and nothing happens. The pointer doesn't change either.
I also tried putting <{Code, apparently I can't post a comment with the correct code}> above {head}, and again, no links are clickable.
Any suggestions or ideas?
http://bubblykori.blogspot.com/
Thank you!
With the need to enter HTML, you'll be better off in an interactive forum like Nitecruzr Dot Net - Blogging. That's much better than Blogger commenting.
New window tut hehe
it works
http://finally-found.blogspot.com/
Had no idea that it would be so easy to implement.
Finally it's working at my blog
http://requestbooks.blogspot.com
David
My blog uses external links as the post title so that's the only thing i want as _blank.
Let me know!
I wasn searching the code to open all my links in new windows, I found that in your web!
But the last 2 paragraphs cought me, I think you advised well to the bloggers like me!
Regards for this kind advice!
Any thoughts? I pasted it right after the [head] code
I've seen hints that this setting isn't 100% reliable, but I've not seen any affinity that defines a problem. Have you yet posted a report in BHF: Something Is Broken? The online forums are much easier to use, then Blogger Blog Commenting, for interactive problem solving.
You saved me from loosing my blog readers!!
Cheers!
really helped a lot.
other blogger advise I've read is long, complicated, applied to each individual link, pic, etc., and often doesn't work.
thank you and God Bless you.
Coding specific links to open in a new tab or window (again, dependent upon browser setup by the readers) is a case by case HTML change.
Shona Cole
http://shonastudio.blogspot.com/
http://tweakblog-guru.blogspot.com/
Agreed. For many bloggers, this is not as useful as it could be. We're stuck with "Edit HTML" for all of our posts, and making bloglists in HTML gadgets, so we can add " target="_blank"" everywhere we need.
I suspect that what you are thinking about is "pop up" windows, not regular display windows. Most people have their browsers configured to block "pop up" windows from untrusted sites.
When you open a link in a new window, that's a full size new window. The size of a new window is determined by current window size that you set, by dragging the browser window edges in and out.
love it!
thanks soooo much for this!
But that does not change the fact that this was extremely helpful information.
TY TY TY!
http://morado-purva.blogspot.com/
Please ask this question in BHF: How Do I?, so we can address your needs most directly.
http://capetownweddingphotographer.blogspot.com/
Try to explain beginners to put target="blanc" in the HTML with every link the post ;-)
http://tunesofthoughts.blogspot.com
GBU
<a href="http://edityourhomemovies.blogspot.com</a>
Our-Potpourri-World.blogspot.com
you saved me hours
I find it annoying when I visit a blog and the link opens in the same window and I have to keep going back.
I didn't want my readers to do the same.
I wish I could be an HTML wizard... glad you are out there helping.
Cheers~Ivy
THANK YOU!
Jenn
We can only (at our option) set links to open in a new tab or window, as permitted by the browsers used by our readers. Our readers have the options to have the browser either:
1. Open "new window" links in a new tab.
2. Open "new window" links in a new window.
3. Ignore the "new window" modifier, and continue to open all links in this tab and window.
http://blogging.nitecruzr.net/2011/06/tab-window-management-is-controlled-by.html
Thank you.
But I do have one question -- I like having most links open in new windows, but I'm not crazy about having the "Older Posts" and "Archive" links open in new windows. Is there any way to force these to open in the _same_ window? Thanks!"
I was wondering the same thing, but about my pages widget. I've used the base target= method and I like it as I have a lot of links, but I want links internal to my blog to open on the same page.
If I'm on the Design>Html tab, and I tick "Expand widget", is there a way I can use your method but localise it to the widget block of code? Thank you so much.
Your information is very helpful and easy to follow.
Thanks again!
I use Google feedreader on blogspot.com and with this all the links were opening in the same window.
Changing this involved a real lot of hassle with XML-sheets etc.
YOUR solution however was REALLY simple, a lot easier and quicker.
I am a happy blogger!
http://leo-joke.blogspot.com
Finally I decided to put your code in the header, mostly for the pure fact that is saves me grief from editing the code over and over for every hyperlink. Also, if the surfer is anything like me, and arrived at my page specifically to read my article, then I won't worry much about the other pages being open. Often I will surf to page a briefly to only find a useful fact that I am looking for, and that is fine too. (I have a Google extension that highlights your search term (usually only when it's a very specific phrase or term and lets you jump right to it, when you arrive on the page, interesting how it was programmed to know when I'm looking for quick info like that) Of course ctrl+f can also be used.
Also, I had written a post last year on my previous way of inserting the target=_blank code for individual hyperlinks which can be viewed here:
http://memeconstruct.blogspot.com/2010/09/how-to-make-links-in-your-blogger-posts.html
Cheers.
Love you!! was trying hard abt it since an hour n finally found your work to be helpful !!!
n was so so so easy to do !
-Saurav Chatterjee
Rafael
agdes.blogspot.com
Thanks
Connie
I don't mind adding the target="blank" to other links that I want to open that way, but as you note changing all links to open this way can be a bit much.
Thanks!
Customisable comment form code is not simple, and varies according to form style.
If you're using an embedded comment form, the comment code is part of the post template. Full page and popup window comment forms are not customisable, as part of the template.
To customise the code, you'll have to use the embedded form. However, the embedded form is bad for many blogs, depending upon who the reader population includes.
http://blogging.nitecruzr.net/2011/01/technical-sophistication-of-your-blogs.html
To make only some links open in a new tab / window, you have to tweak the HTML on each link, one by one.
http://blogging.nitecruzr.net/2009/02/make-links-open-in-new-window.html