Minecraft Wiki
(Beans1512 (トーク) による版 145705 を取り消し)
編集の要約なし
(3人の利用者による、間の16版が非表示)
1行目: 1行目:
  +
<includeonly><!--
<div style="
 
  +
margin-bottom: 1em;
 
  +
Local variables used in the argument processing loop:
text-align: center;
 
  +
argnum index for accessing template call arguments
">
 
  +
argval value of indexed template call argument
<div style="
 
  +
edition name of the edition as used on the wiki; obsolescent argument values are upgraded here
display: inline-block;
 
  +
linkname name of the edition's article page for linking
border: 2px solid #95D1E9;
 
  +
category name of the category for edition-only specifics
background-color: #E6F3F7;
 
  +
Output variables used by the template expansion:
padding: 10px 10px 2px;
 
  +
editions comma-separated list of edition names
min-width: 350px;
 
  +
categories list of bracketed category names separated by spaces
height: {{#if: {{#pos:{{lc:{{{1}}} {{{2}}} {{{3}}} }}|education}}|90px|75px}};
 
  +
position: relative;
 
  +
(Re-)Initialize output variables in case the template is used multiple times on a page
">{{animate|{{
 
  +
--> {{#vardefine: editions}} <!--
#switch: {{lc:{{{1|java}}}}}
 
  +
--> {{#vardefine: categories}} <!--
|bedrock=mclogo.svg
 
  +
|console=Legacy Console Edition.png
 
  +
-- Process the arguments --
|education=Education Edition.svg
 
  +
--> {{#fornumargs: argnum | argval |
|{{ucfirst:{{{1|java}}}}} Edition.png
 
  +
<!-- set local variable values per argument keyword; replace obsolescent edition names -->
}}{{
 
 
{{#switch: {{lc:{{#var: argval}} }}
 
  +
| java =
#if: {{{2|}}}
 
  +
{{#vardefine: edition | ''Java Edition''}}
|;{{
 
  +
{{#vardefine: linkname | Java Edition}}
#switch: {{lc:{{{2}}}}}
 
  +
{{#vardefine: category | Java Edition}}
|bedrock=mclogo.svg
 
|console=Legacy Console Edition.png
+
| bedrock =
|education=Education Edition.svg
+
{{#vardefine: edition | Bedrock Edition}}
  +
{{#vardefine: linkname | Bedrock Edition}}
|{{ucfirst:{{{2}}}}} Edition.png
 
  +
{{#vardefine: category | Bedrock Edition}}
}}
 
  +
| console | legacy console =
}}{{
 
  +
{{#vardefine: edition | Legacy Console Edition}}
 
  +
{{#vardefine: linkname | Legacy Console Edition}}
#if: {{{3|}}}
 
  +
{{#vardefine: category | Legacy Console Edition}}
|;{{
 
  +
| education | edu =
#switch: {{lc:{{{3}}}}}
 
  +
{{#vardefine: edition | ''Education Edition''}}
|bedrock=mclogo.svg
 
|console=Legacy Console Edition.png
+
{{#vardefine: linkname | Education Edition}}
|education=Education Edition.svg
+
{{#vardefine: category | Education Edition}}
  +
| new3ds | new 3ds | 3ds =
|{{ucfirst:{{{3}}}}} Edition.png
 
  +
{{#vardefine: edition | ''New Nintendo 3DS Edition''}}
}}
 
  +
{{#vardefine: linkname | New Nintendo 3DS Edition}}
}}|250px}}
 
  +
{{#vardefine: category | New Nintendo 3DS Edition}}
<div style="
 
  +
| earth =
position: absolute;
 
  +
{{#vardefine: edition | ''Minecraft Earth''}}
bottom: 0;
 
  +
{{#vardefine: linkname | Minecraft Earth}}
left: 0;
 
  +
{{#vardefine: category | Minecraft Earth}}
right: 0;
 
  +
| dungeons =
"><br/><hr/>'''{{
 
  +
{{#vardefine: edition | ''Minecraft Dungeons''}}
#if: {{{3|}}}
 
  +
{{#vardefine: linkname | Minecraft Dungeons}}
|[[{{ucfirst:{{{1|java}}}}} Edition|{{ucfirst:{{{1|java}}}}}]]、[[{{ucfirst:{{{2}}}}} Edition|{{ucfirst:{{{2}}}}}]] そして [[{{ucfirst:{{{3}}}}} Edition]] 限定'''
 
  +
{{#vardefine: category | Minecraft Dungeons}}
|[[{{ucfirst:{{{1|java}}}}} Edition]] {{
 
  +
| #default =
#if: {{{2|}}} |および [[{{ucfirst:{{{2}}}}} Edition]]
 
  +
{{#vardefine: edition | {{ucfirst:{{#var: argval}} Edition}} }}
}} 限定'''
 
  +
{{#vardefine: linkname | {{#var: edition}} }}
}}</div></div></div><includeonly>{{
 
  +
{{#vardefine: category | {{#var: edition}}}}
#if: {{{nocat|}}}
 
  +
}} <!--
|<!-- no category for instances that have the argument "nocat" set -->
 
  +
|{{
 
  +
-- Append values to output variables, inserting punctuation and wiki markup where needed
#switch: {{NAMESPACE}}
 
  +
--> {{#vardefine: editions |
| {{TALKSPACE}} | {{ns:3}} = <!-- no category for user pages or talk pages -->
 
  +
{{#if: {{#var: editions|}} <!-- not the 1st edition arg -->
| #default = [[カテゴリ:{{#switch: {{lc:{{{1|}}}}} | console = Legacy Console | #default = {{ucfirst:{{{1|java}}}}}}} Edition限定]] {{
 
  +
| {{#if: {{{ {{#expr: {{#var: argnum}} + 1}}| }}} <!-- not the last edition arg -->
#if:{{{2|}}} | [[カテゴリ:{{#switch: {{lc:{{{2|}}}}} | console = Legacy Console | #default = {{ucfirst:{{{2|}}}}}}} Edition限定]] }}{{
 
  +
| {{#var: editions}}、
#if:{{{3|}}} | [[カテゴリ:{{#switch: {{lc:{{{3|}}}}} | console = Legacy Console | #default = {{ucfirst:{{{3|}}}}}}} Edition限定]] }}
 
  +
| {{#var: editions}}、および
}}
 
  +
}}
}}</includeonly><noinclude>{{documentation}}</noinclude>
 
  +
}}[[{{#ifeq: {{#var: linkname}} | {{#var: edition}}
  +
|
  +
| {{#var: linkname}} {{!}}
  +
}}{{#var: edition}}]]
  +
}}
  +
{{#vardefine: categories | {{#var: categories}} [[カテゴリ: {{#var: category}}{{#if: {{{section|}}} | 限定}}]] }}
  +
}} <!--
  +
  +
-- Generate the msgbox, adding HTML and CSS styling where needed
  +
--> {{msgbox | bgcol=#e6f3f7 | linecol=#95d1e9
  +
| title = {{#if: {{{customtext|}}} | {{{customtext}}} | この項目は{{#var: editions}}限定の要素です。}}
  +
| image = {{{image|Information icon.svg}}}
  +
| mini = {{{section|}}}
  +
}} <!--
  +
  +
-- Add categories for edition-only information
 
--> {{#if: {{{nocat|}}}
 
| <!-- no category for instances that have the argument "nocat" set -->
 
| {{#switch: {{NAMESPACE}}
  +
| {{TALKSPACE}} | {{ns:User}} =
 
<!-- no category for user pages or talk pages -->
  +
| {{#var: categories}} {{#if: {{{customtext|}}} | [[カテゴリ:テンプレート:Exclusiveでcustomtextを指定しているページ]]}}
  +
}}
  +
}} <!--
  +
--> </includeonly> <!--
 
--> <noinclude> {{documentation}} </noinclude> <!--
  +
<!-- カテゴリと言語間リンクはここではなく、解説ページに追加してください -->

2020年10月10日 (土) 15:30時点における版

このテンプレートは、Minecraftの特定のエディションにのみ存在する要素が含まれていることを示す際に使用されます。パラメータに指定されたエディションを、ページ上部か左マージンにあるメッセージボックスに表示します。また、関連するメンテナンスカテゴリをページに追加します。

このテンプレートは、全体にエディション限定の要素を含むページ、またはセクションに対して使用されます。ある一つの要素にのみ言及する場合は、このテンプレートの代わりに {{only}} を使用してください。

使用法

{{exclusive|1|2|3|4|section=節に対して使用する場合に指定|customtext=カスタムテキスト|nocat=カテゴリ追加を抑止する場合に指定}}

パラメータ

Minecraftの特定のエディションにのみ組内する要素が含まれていることを示します。

テンプレート引数

引数説明状態
エディション1 2 3 4

以下の表を参照

文字列必須
節に対しての使用section

メッセージボックスのスタイルを節に適したものに変更します。テンプレートは節のヘッダーの直後に配置してください。また、ページに追加されるカテゴリには「限定」が付加されます。

ブール値省略可能
カスタムテキストcustomtext

メッセージボックス内のテキストをこの文字列に置き換えます。

省略可能
カテゴリに追加しないnocat

解説ページや議論ページなどで、エディション限定の要素があることを示すのではなく、テンプレートの例を示したり、言及したりする場合にはこのパラメータを指定してください。また、より具体的なカテゴリに追加する場合にも指定してください。

ブール値省略可能

エディション

このテンプレートでは、任意の数の名前なしパラメータを指定することができます。パラメータの値により、表示されるエディション名、リンク先のページ名、メンテナンスカテゴリが自動的に選択されます。不明なパラメータの値が指定された場合、既定の値は式によって生成されます(これが意図的かそうでないかに関わらず、赤リンクを生成する可能性があります)。

パラメータの値 エディション名 リンク先 メンテナンスカテゴリ
bedrock Bedrock Edition Bedrock Edition カテゴリ:Bedrock Edition
java Java Edition Java Edition カテゴリ:Java Edition
console
legacy console
Legacy Console Edition Legacy Console Edition カテゴリ:Legacy Console Edition
education
edu
Minecraft Education Minecraft Education カテゴリ:Education Edition
new 3DS
new3DS
3DS
New Nintendo 3DS Edition New Nintendo 3DS Edition カテゴリ:New Nintendo 3DS Edition
earth Minecraft Earth Minecraft Earth カテゴリ:Minecraft Earth
dungeons Minecraft Dungeons Minecraft Dungeons カテゴリ:Minecraft Dungeons
(未知の値) <param> Edition [[<param> Edition]] カテゴリ:<パラメータ> Edition

使用例

テンプレートコード 結果
エディション名を1つ指定する:
{{Exclusive|java}}
Information icon
この項目はJava Edition限定の要素です。 
エディション名を複数指定する:
{{Exclusive|bedrock|education|java}}
Information icon
この項目はBedrock EditionEducation Edition、およびJava Edition限定の要素です。 
カスタムテキストを指定する:
{{Exclusive|console|customtext=この要素は[[Legacy Console Edition]]にのみ存在します。}}
Information icon
この要素はLegacy Console Editionにのみ存在します。 
節に対して使用する:
{{Exclusive|3ds|section=1}}
Information icon
この項目はNew Nintendo 3DS Edition限定の要素です。 
[閲覧 | 編集 | 履歴 | キャッシュ破棄]上記の解説は、テンプレート:Exclusive/docから参照されています。