Help:LinkTarget

From MediaWiki

To make the link open a new window or new tab (depending on your browser config) use one of the following methods.

HTML classes[edit source]

Method

Add newtab-internal or newtab-external classes to the link wrapping (parent) element:

* <span class="newtab-internal">[[Main Page]]</span>
* <span class="newtab-external">[https://github.com/wikimedia/mediawiki-extensions-LinkTarget LinkTarget Repo]</span>
Result

Template for internal links[edit source]

Method

Use template for link creation. As the first parameter, put target page name. The second parameter is optional and defines the link text.

Template
OntiOpen link in New Tab (Internal)
Code
* {{onti|Main Page|Main page}}
Result

Template for external links[edit source]

Method

Use template for link creation. As the first parameter, put link URL. The second parameter is optional and defines the link text.

Template
OnteOpen link in New Tab (External)
Code
* {{onte|https://github.com/wikimedia/mediawiki-extensions-LinkTarget|LinkTarget Repo}}
Result