Changes

Jump to navigation Jump to search

Template:Mediawiki

3,537 bytes added, 21:11, 6 September 2017
m
1 revision imported
<span class="plainlinks">[https://mediawiki.org/<!--
-->{{#if: {{{diff|}}} <!-- Is there a diff parameter and a permalink should be used? -->
| <!-- Yes there is a diff parameter, use permalink -->
w/index.php?title={{urlencode:{{{1|Main Page}}}|wiki}}<!--
-->{{#if: {{{lang|}}}
| /{{{lang}}}
}}<!--
-->&oldid={{{oldid|}}}
| <!-- No there is no diff parameter, use regular link -->
wiki/{{urlencode:{{{1|Main Page}}}|wiki}}<!--
-->{{#if: {{{lang|}}}
| /{{{lang}}}
}}<!--
-->}} <!--
-->{{#if: {{{2|}}} <!-- Is there an alternative text? -->
| <!-- Yes, there is an alternative text -->
{{{2}}}
| <!-- No, there is no alternative text -->
mw:{{{1|Main Page}}}
}}]</span><!--
-->{{#if: {{{oldid|}}} <!-- Is there an oldid parameter? -->
| <!-- Yes there is an oldid parameter -->
&nbsp;(<span class="plainlinks">[https://mediawiki.org/w/index.php?title={{urlencode:{{{1|Main Page}}}|wiki}}<!--
-->{{#if: {{{lang|}}}
| /{{{lang}}}
}}<!--
-->{{#if: {{{diff|}}} <!-- Is there also a non-empty diff parameter? -->
| <!-- Yes, there there also a non-empty diff parameter, show a link to the diff -->
&diff=prev&oldid={{{oldid|}}} diff
| <!-- No, there no diff parameter, show permalink -->
&oldid={{{oldid|}}} perm
}}<!--
-->]</span>)
}}<noinclude>
{{Informative template|1=
__NOTOC__
== Goal ==
This template can be used for links to MediaWiki wiki pages.

== Usage ==
{{obr}}'''mediawiki'''{{!}}''page title''{{!}}''alternative text''{{!}}''lang=''{{!}}''oldid=''{{!}}''diff=''{{cbr}}

All parameters are optional.

; page title: Page title to link to. Defaults to '''Main Page'''.

; alternative text: Alternative text to be shown instead of the page title. Note that if this parameter is not given, '''mw:''' will be appended to the page name.

; lang: Language code to link to another language version than the English one. The language will not be shown (currently not implemented), but the page title might give a hint.

; oldid: Oldid from the end of the MediaWiki wiki permalink URL to use when linking to a specific article revision. Can be found through the page history.

; diff: If not empty a link to a diff comparing the oldid revision with the previous revision will be shown. Instead of a regular link and a permalink a permalink and a link to a diff will be shown.

== Examples ==
<nowiki>See the {{mediawiki|Help:Extension:ParserFunctions}} article on the MediaWiki wiki.</nowiki>
See the {{mediawiki|Help:Extension:ParserFunctions}} article on the MediaWiki wiki.

<nowiki>External link: {{mediawiki|Extension:ParserFunctions|ParserFunctions extension}}</nowiki>
External link: {{mediawiki|Extension:ParserFunctions|ParserFunctions extension}}

<nowiki>See the Italian translation of {{mediawiki|Help:Magic words|lang=it}}.</nowiki>
See the Italian translation of {{mediawiki|Help:Magic words|lang=it}}.

<nowiki>The MediaWiki 1.26 release notes {{wikipedia|Release notes/1.26|as of 25 February 2016|oldid=2061268}}.</nowiki>
The MediaWiki 1.26 release notes {{wikipedia|Release notes/1.26|as of 25 February 2016|oldid=2061268}}.

<nowiki>Fix to {{wikipedia|Manual:Substitution|oldid=1081828|diff=1}} on Wikipedia.</nowiki>
Fix to {{wikipedia|Manual:Substitution|oldid=1081828|diff=1}} on Wikipedia.

== Known issues ==
* You can not link to a section using a number sign (#) when using '''oldid''' or '''diff'''.

== Related templates ==
* {{tl|wikipedia}}
* {{tl|cite web}}

}}

[[Category:Link templates]]
</noinclude>

Navigation menu