Components/Links: Difference between revisions

From Visual Data Wiki
Jump to navigation Jump to search
No edit summary
Tag: 2017 source edit
No edit summary
Tag: 2017 source edit
Line 17: Line 17:


In addition this class is configured in LocalSeetings.php for [https://www.mediawiki.org/wiki/Extension:LinkTarget Extension:LinkTarget] and overwrites the standard behavior for external links (opens in the same tab instead of a new one).
In addition this class is configured in LocalSeetings.php for [https://www.mediawiki.org/wiki/Extension:LinkTarget Extension:LinkTarget] and overwrites the standard behavior for external links (opens in the same tab instead of a new one).
Note: In external links you need to use an underscore (_) for pagenames with spaces (Main_Page instead of Main Page).


<syntaxhighlight lang="wikitext"><span class="plainlinks">[{{SERVER}}/wiki/Main_Page?name={{CURRENTUSER}} Send me home with my name as URL parameter]</span></syntaxhighlight>
<syntaxhighlight lang="wikitext"><span class="plainlinks">[{{SERVER}}/wiki/Main_Page?name={{CURRENTUSER}} Send me home with my name as URL parameter]</span></syntaxhighlight>
<span class="plainlinks">[{{SERVER}}/wiki/Main_Page?name={{CURRENTUSER}} Send me home with my name as URL parameter]</span>
<span class="plainlinks">[{{SERVER}}/wiki/Main_Page?name={{CURRENTUSER}} Send me home with my name as URL parameter]</span>

Revision as of 12:42, 13 March 2024

Internal Links

[[Main Page|Send me home]]

Send me home

External Links

[https://webmo.info WebMo Website]

WebMo Website

External Links that behaves like internal links

This is useful if you have a link with URL parameters. Note CSS class="plainlinks" in the <span>-wrapper:

This class comes with MediWiki core and hides the symbol for external links.

In addition this class is configured in LocalSeetings.php for Extension:LinkTarget and overwrites the standard behavior for external links (opens in the same tab instead of a new one).

Note: In external links you need to use an underscore (_) for pagenames with spaces (Main_Page instead of Main Page).

<span class="plainlinks">[{{SERVER}}/wiki/Main_Page?name={{CURRENTUSER}} Send me home with my name as URL parameter]</span>

Send me home with my name as URL parameter