「テンプレート:Mediawiki/doc」の版間の差分

提供: ひつじ小屋別館2代目
移動先: 案内検索
(Undo revision 520155 by Rd232 (talk))
(1版 をインポートしました)
 
(2人の利用者による、間の2版が非表示)
3行目: 3行目:
 
# (optional) Link description
 
# (optional) Link description
 
# (optional) Special. Set this to "yes" for special pages, and the template will link to the local Special page if it exists (otherwise, it will point to mediawiki.org).
 
# (optional) Special. Set this to "yes" for special pages, and the template will link to the local Special page if it exists (otherwise, it will point to mediawiki.org).
<!-- Compatibility Note: The "mw" prefix is only in the default interwiki prefixes since MediaWiki 1.16 (see mw:Manual:Interwiki#References). If you plan to use this script with an older version, it might be possible or necessary to use the "mediawikiwiki" prefix. -->
 
  
 
{{ #ifeq:
 
{{ #ifeq:
9行目: 8行目:
 
| MediaWiki
 
| MediaWiki
 
| This is so that the public domain help pages - which can be freely copied and included in other sites - have correct links to Mediawiki:
 
| This is so that the public domain help pages - which can be freely copied and included in other sites - have correct links to Mediawiki:
* on external sites, it creates an interwiki link to 'mw' (included in the default interwiki table for new installs)
+
* on external sites, it creates an interwiki link to 'mediawikiwiki' (included in the default interwiki table for new installs)
 
* on Mediawiki, it creates an internal or interwiki link
 
* on Mediawiki, it creates an internal or interwiki link
  
15行目: 14行目:
  
 
==Examples==
 
==Examples==
*{{tlx|1=Mediawiki|2=Page_Title}}
+
*{{tlx|mediawiki|Project:About}} yields {{mediawiki|Project:About}}
*{{tlx|1=Mediawiki|2=Page_Title|3=text}}
+
*{{tlx|mediawiki|Project:About|About MediaWikiWiki}} yields yields {{mediawiki|Project:About|About MediaWikiWiki}}
 
+
*{{tlx|mediawiki|m:Project:About|About Meta}} yields {{mediawiki|m:Project:About|About Meta}}
== Demo of interwiki link ==
+
*{{tlx|mediawiki|Special:OAuthConsumerRegistration|Register on mw:|4=special=1}} yields {{mediawiki|Special:OAuthConsumerRegistration|Register on mw:|special=1}}
 
+
----
<nowiki>{{mediawiki|m:Help:Calculation|Help:Calculation}}</nowiki> gives either<br /> <nowiki>[[m:Help:Calculation|Help:Calculation]] or [[mw:m:Help:Calculation|Help:Calculation]]</nowiki>.
+
<templatedata>
 
+
{
{{Languages|Template:Mediawiki/doc}}
+
"description": "MediaWikiWiki interwiki link for missing local page",
 
+
"params": {
<includeonly>[[Category:Info templates|MediaWiki]]
+
"1": {
[[Category:Help]]</includeonly>
+
"label": "page",
 +
"description": "Wikilink working on MediaWikiWiki",
 +
"type": "wiki-page-name",
 +
"required": true
 +
},
 +
"2": {
 +
"label": "text",
 +
"description": "Link text (default page name)",
 +
"type": "string"
 +
},
 +
"special": {
 +
"description": "Any non-empty value to try local before MediaWikiWiki special page",
 +
"type": "string"
 +
}
 +
}
 +
}
 +
</templatedata><includeonly>[[Category:Link templates|MediaWiki]]</includeonly>

2015年1月2日 (金) 18:52時点における最新版

This template links to a page on mediawiki.org from the Help pages. The template has three parameters:

  1. Pagename, optionally preceded by an interwiki link prefix valid on mediawiki.org
  2. (optional) Link description
  3. (optional) Special. Set this to "yes" for special pages, and the template will link to the local Special page if it exists (otherwise, it will point to mediawiki.org).


Examples[編集]


MediaWikiWiki interwiki link for missing local page

テンプレート引数

This template prefers inline formatting of parameters.

引数説明状態
page1

Wikilink working on MediaWikiWiki

既定
自動入力値
wiki-page-name必須
text2

Link text (default page name)

既定
自動入力値
string省略可能
Specialspecial

Any non-empty value to try local before MediaWikiWiki special page

既定
自動入力値
string省略可能