Tags:
create new tag
, view all tags

Question

My Twiki site users wanted me to change the default Interwiki link behavior so that a link will open in a new browser window. I thought I changed the appropriate line of code in the InterwikiPlugin.pm file.

It didn't seem to work though. I'm no perl expert but I didn't see (off the bat) where else to do this.

I changed line number 158 from:

$text = "$thePrefix<a href=\"$text\"$title>$theSite\:$theTopic</a>";

to:

$text = "$thePrefix<a href=\"$text\"$title target='_blank'>$theSite\:$theTopic</a>";

Was this the right approach?

Thank you,

BrianBeaudet

Environment

TWiki version: TWikiRelease04x00x04
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  
Categories:  

-- BrianBeaudet - 01 Sep 2006

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.

No takers on this one.

-- BrianBeaudet - 08 Sep 2006

Yes Brian, this is the right approach.

You could suggest in the InterwikiPluginDev topic to add a flag to configure the plugin to open a new window or not.

-- PeterThoeny - 08 Sep 2006

Will do.

-- BrianBeaudet - 18 Sep 2006

I have it working. I combined your modification with a modification to Render.pm. On line 771 I changed:

$opt = ' target="_top"';

to

$opt = ' target="_blank"';

-- AndyFranklin - 19 Oct 2006

 
Change status to:
Topic revision: r5 - 2006-10-19 - AndyFranklin
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.