[pmwiki-users] Having all HTTP links open in a new window?

Patrick R. Michaud pmichaud at pobox.com
Mon Jan 16 20:49:13 CST 2006


On Mon, Jan 16, 2006 at 06:33:19PM -0800, Roy wrote:
> I know that I can create a link that opens in a new window with the
> following syntax...
> 
> %newwin% [[http://www.google.com | Google]]
> 
> Unfortunately, my documents will include lots of links to other sites
> and I would prefer this to be the same behavior for all http links.
> 
> Is it possible to make this the default behavior (links open in a new
> window) and not have intradocument links (like links from one page of
> the wiki to another) suddenly start popping open new browser windows
> too?

In your local/config.php, set:

  $UrlLinkFmt =
    "<a target='_blank' class='urllink' href='\$LinkUrl' 
      rel='nofollow'>\$LinkText</a>";

Pm




More information about the pmwiki-users mailing list