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 someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is 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:
Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2006-10-19 - AndyFranklin
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.