Open mediawiki external links in new window

From The IT Community
Jump to: navigation, search




If you have a MediaWiki site and you put external links in your articles, it might bother you that when users click on them, the link will open in the same window as your site is in and therefore replacing it.


Here is how to open MediaWiki external links in new window:

  • Using an editor, edit the LocalSettings.php file which is located in the root of your MediaWiki site.
  • Insert the following line:
$wgExternalLinkTarget = '_blank';
  • Reload the article with the external link, it will now open in a new window, or a new tab.


Was this article helpful? Then please donate to keep The IT Community alive...

If you found this article helpful please share it, comment and help others by writing your own article.






Translate this page:




Articles found in the same category:
(max. 20 shown)