Personal tools
You are here: Home Documentation How-tos How to Make Links Open in a New Window
Document Actions

How to Make Links Open in a New Window

This How-to applies to: 2.1

When you're linking to a page on a separate website, it's nice to have it open in a new window so you don't lose people to that site. Learn how to control that with a touch of HTML.

  1. Create an external link to an outside website
  2. Dive straight into the HTML of the page -- Click the icon that looks like a scroll or simply says HTML in little letters.  You'll know you clicked the right spot when your nicely formatted page turns into a mess of garbled HTML.
  3. Find the link that you created.  If the link I created was for the phrase "newspaper" linking to the NY Times (like this: newspaper), I would look for HTML like the following:
    <a href="http://www.nytimes.com">newspaper</a>
  4. Add the following little scrap of code that appears in dark grey to that HTML:
    <a target="_blank" href="http://nytimes.com">newspaper</a>
  5. Sometimes you'll see a target attribute already there like this:
    <a target="_self" href="http://www.nytimes.com>newspaper</a>
  6. In that case, just change _self to _blank
  7. That's it!  Hit Save.  When anyone clicks your modified link, it will open in a new window.
by samk last modified 2007-10-10 09:11
Contributors: Sam Knox
All content on this site is licensed under a Creative Commons License.
Still Stumped?
If you've still got questions about Plone, here are your best bets for finding out more:
 

All content in this site distributed under the Creative Commons "Attribution-NonCommercial-ShareAlike" license unless otherwise noted.

Powered by Plone CMS, the Open Source Content Management System