Page 1 of 1

Open link in content in a new window?

Posted: Wed Nov 22, 2006 3:32 pm
by Dawn
Hi,

I wanted to ask here if is possible to open a new window when a user click on a link in a blogpost...? And if yes, how can that be done...?

Greets and best regards,
Dawn

Re: Open link in content in a new window?

Posted: Wed Nov 22, 2006 3:36 pm
by garvinhicking
Hi!

Usually this is a decision made by the browser. Your webpage should not instruct that.

You would need to put "target='_blank'" in all of your <a> links that you want to open in a new link.

Best regards,
Garvin

Posted: Wed Nov 22, 2006 3:43 pm
by Dawn
Hi Garvin,

You've allways VERY FAST :) I know that I can use "_blank" in the <a> tag to open it in a new window. But can I do that automaticly for links in blog-posts? I don't want to get my visitors away if they click on a link. So it would be nice if that can be done in the theme. But I don't know if that's possible...

Greets,
Dawn

Posted: Wed Nov 22, 2006 4:18 pm
by garvinhicking
Hi!

No, you cannot do that. This is because we firmly believe in the concept that a browser has to decide how to open links. If you want to override that you would need to manually add that attribute to the tag, or you will need to write a plugin that rewrites all <a> tags to <a href>, maybe you can even use the 'content rewrite' plugin for that?

But again: Believe in your visitors. Give them the power to decide themselves hwo they open a link.

Regards,
Garvin

Posted: Wed Nov 22, 2006 4:27 pm
by Dawn
Ok, I can live with that. I think in some situations it would be nice to open new windows (links to wikipedia for example or other news) but it isn't very important.

Thanks for your fast answer :)

Greets,
Andy