Minecraft Wiki
Majr (diskuse | příspěvky)
m (naimportována 1 revize: Import EN templates)
Bez shrnutí editace
Řádek 1: Řádek 1:
  +
<includeonly><!--
<div style="
 
  +
border: 2px solid #95D1E9;
 
  +
Local variables used in the argument processing loop:
background-color: #E6F3F7;
 
  +
argnum index for accessing template call arguments
text-align: center;
 
  +
argval value of indexed template call argument
margin: 0 auto 1em;
 
  +
edition name of the edition as used on the wiki; obsolescent argument values are upgraded here
padding: 10px 10px 2px;
 
  +
linkname name of the edition's article page for linking
width: 300px;
 
  +
category name of the category for edition-only specifics
height: {{#if: {{#pos:{{lc:{{{1}}} {{{2}}} {{{3}}} }}|education}}|90px|75px}};
 
  +
Output variables used by the template expansion:
position: relative;
 
  +
editions comma-separated list of edition names
">{{animate|{{
 
  +
categories list of bracketed category names separated by spaces
#switch: {{lc:{{{1|java}}}}}
 
  +
|java=mclogo.svg
 
  +
(Re-)Initialize output variables in case the template is used multiple times on a page
|{{ucfirst:{{{1|java}}}}} Edition.png
 
  +
--> {{#vardefine: editions}} <!--
}}{{
 
  +
--> {{#vardefine: categories}} <!--
 
  +
#if: {{{2|}}}
 
  +
-- Process the arguments --
|;{{
 
  +
--> {{#fornumargs: argnum | argval |
#switch: {{lc:{{{2}}}}}
 
  +
<!-- set local variable values per argument keyword; replace obsolescent edition names -->
|java=mclogo.svg
 
 
{{#switch: {{lc:{{#var: argval}} }}
|{{ucfirst:{{{2}}}}} Edition.png
 
  +
| java =
}}
 
  +
{{#vardefine: edition | Java Edition}}
}}{{
 
  +
{{#vardefine: linkname | Java Edition}}
 
  +
{{#vardefine: category | Java Edition}}
#if: {{{3|}}}
 
  +
| bedrock =
|;{{
 
  +
{{#vardefine: edition | Bedrock Edition}}
#switch: {{lc:{{{3}}}}}
 
  +
{{#vardefine: linkname | Bedrock Edition}}
|java=mclogo.svg
 
  +
{{#vardefine: category | Bedrock Edition}}
|{{ucfirst:{{{3}}}}} Edition.png
 
  +
| console | legacy console =
}}
 
  +
{{#vardefine: edition | Legacy Console Edition}}
}}|250px}}
 
  +
{{#vardefine: linkname | Legacy Console Edition}}
<div style="
 
  +
{{#vardefine: category | Legacy Console Edition}}
position: absolute;
 
  +
| ps4 | playstation 4 =
bottom: 0;
 
  +
{{#vardefine: edition | PlayStation 4 Edition}}
left: 0;
 
  +
{{#vardefine: linkname | PlayStation 4 Edition}}
right: 0;
 
  +
{{#vardefine: category | PlayStation 4 Edition}}
"><br/><hr/>'''{{
 
  +
| education | edu =
#if: {{{3|}}}
 
  +
{{#vardefine: edition | Education Edition}}
|[[{{ucfirst:{{{1|java}}}}} Edition|{{ucfirst:{{{1|java}}}}}]], [[{{ucfirst:{{{2}}}}} Edition|{{ucfirst:{{{2}}}}}]] & [[{{ucfirst:{{{3}}}}} Edition]]s only'''
 
  +
{{#vardefine: linkname | Education Edition}}
|[[{{ucfirst:{{{1|java}}}}} Edition]] {{
 
  +
{{#vardefine: category | Education Edition}}
#if: {{{2|}}} |& [[{{ucfirst:{{{2}}}}} Edition]]
 
  +
| new3ds | new 3ds | 3ds =
}} only'''
 
  +
{{#vardefine: edition | New Nintendo 3DS Edition}}
}}</div></div><includeonly>{{
 
  +
{{#vardefine: linkname | New Nintendo 3DS Edition}}
#if: {{{nocat|}}}
 
  +
{{#vardefine: category | New Nintendo 3DS Edition}}
|<!-- no category for instances that have the argument "nocat" set -->
 
  +
| #default =
|{{
 
  +
{{#vardefine: edition | {{ucfirst:{{#var: argval}} Edition}} }}
#switch: {{NAMESPACE}}
 
  +
{{#vardefine: linkname | {{#var: edition}} }}
| {{TALKSPACE}} | {{ns:3}} = <!-- no category for user pages or talk pages -->
 
  +
{{#vardefine: category | {{#var: edition}}}}
| #default = [[Category:{{{1|java}}} Edition only]] {{
 
  +
}} <!--
#if:{{{2|}}} | [[Category:{{{2}}} Edition only]] }}{{
 
  +
#if:{{{3|}}} | [[Category:{{{3}}} Edition only]] }}
 
  +
-- Append values to output variables, inserting punctuation and wiki markup where needed
}}
 
  +
--> {{#vardefine: editions |
}}</includeonly><noinclude>{{documentation}}</noinclude>
 
  +
{{#if: {{#var: editions|}} <!-- not the 1st edition arg -->
  +
| {{#if: {{{ {{#expr: {{#var: argnum}} + 1}}| }}} <!-- not the last edition arg -->
  +
| {{#var: editions}},
  +
| {{#var: editions}} and
  +
}}
  +
}} [[{{#ifeq: {{#var: linkname}} | {{#var: edition}}
  +
|
  +
| {{#var: linkname}} {{!}}
  +
}} {{#var: edition}}]]
  +
}}
  +
{{#vardefine: categories | {{#var: categories}} [[Category: {{#var: category}}]] }}
  +
}} <!--
  +
  +
-- Generate the msgbox, adding HTML and CSS styling where needed
  +
--> {{msgbox | bgcol=#e6f3f7 | linecol=#95d1e9
  +
| title = {{#if: {{{customtext|}}} | {{{customtext}}} | This feature is exclusive to {{#var: editions}}.}}
  +
| css = display: table;
  +
| 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|}}} | [[Category:Pages using the Exclusive template customtext parameter]]}}
  +
}}
  +
}} <!--
  +
--> </includeonly> <!--
 
--> <noinclude> {{documentation}} </noinclude> <!--
  +
<!-- Put categories/interwiki on the documentation page -->

Verze z 3. 7. 2019, 17:27

[view | edit | history | purge]Documentation


This template is used to mark features exclusive to a version or specific versions of Minecraft.

Usage

  • {{{1}}} - First version, defaults to Java
  • {{{2}}} - Second version. Unused if unset
  • {{{3}}} - Third version. Unused if unset
  • {{{nocat}}} - If set, no categories will be added.

Categories

Pages will automatically be added to a category based on what either version is set to unless {{{nocat}}} is set. Specific categories produced are as follows:

  • java: Category:Java Edition only
  • pocket: Category:Pocket Edition only
  • console: Category:Console Edition only
  • education: Category:Education Edition only

Example

{{exclusive}}
OR
{{exclusive|java}}

Produces

Information icon
This feature is exclusive to Java Edition. 

Example

{{exclusive|pocket|console}}

Produces

Information icon
This feature is exclusive to Pocket Edition and Legacy Console Edition. 

Example

{{exclusive|java|pocket|console}}

Produces

Information icon
This feature is exclusive to Java Edition, Pocket Edition and Legacy Console Edition. 
[view | edit | history | purge]The above documentation is transcluded from Šablona:Exclusive/doc.