• Welcome to the Kancolle Wiki!
  • If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord

Difference between revisions of "Template:Equipment"

From Kancolle Wiki
Jump to navigation Jump to search
m
Line 1: Line 1:
<includeonly>{{#vardefine:info|{{#invoke:EquipmentPage|info|pagename={{PAGENAME}}}}}}{{#vardefine:wikipedia|{{#invoke:EquipmentPage|wikipedia|pagename={{PAGENAME}}}}}}{{#vardefine:buildable|{{#invoke:EquipmentPage|buildable|pagename={{PAGENAME}}}}}}{{#vardefine:improvable|{{#invoke:EquipmentPage|improvable|pagename={{PAGENAME}}}}}}{{EquipmentInfoKai|{{{1|{{PAGENAME}}}}}}}
+
<includeonly>{{#vardefine:info|{{#invoke:EquipmentPage|info|pagename={{PAGENAME}}}}}}{{#vardefine:wikipedia|{{#invoke:EquipmentPage|wikipedia|pagename={{PAGENAME}}}}}}{{#vardefine:buildable|{{#invoke:EquipmentPage|buildable|pagename={{PAGENAME}}}}}}{{#vardefine:improvable|{{#invoke:EquipmentPage|improvable|pagename={{PAGENAME}}}}}}{{EquipmentInfoKai|{{{1|{{PAGENAME}}}}}}}{{EquipmentCategoriesKai|{{{1|{{PAGENAME}}}}}}}
{{EquipmentCategoriesKai|{{{1|{{PAGENAME}}}}}}}
 
 
<h2>Introduction</h2>
 
<h2>Introduction</h2>
 
<p>{{#if:{{#var:info}}|{{#var:info}}|{{#if:{{{ja|}}}|{{{ja}}}|?}}}}</p>
 
<p>{{#if:{{#var:info}}|{{#var:info}}|{{#if:{{{ja|}}}|{{{ja}}}|?}}}}</p>
Line 8: Line 7:
 
{{#categorytree:Ships with {{{1|{{PAGENAME}}}}} as stock equipment|mode=pages|depth=0}}
 
{{#categorytree:Ships with {{{1|{{PAGENAME}}}}} as stock equipment|mode=pages|depth=0}}
 
{{#categorytree:Equipment that consume {{{1|{{PAGENAME}}}}} during improvement|mode=pages|depth=0}}
 
{{#categorytree:Equipment that consume {{{1|{{PAGENAME}}}}} during improvement|mode=pages|depth=0}}
{{{notes|}}}{{clear}}
+
{{#if:{{{header|}}}||{{{notes|}}}{{clear}}
{{#if:{{{improvement|}}}|<h2>Improvement</h2>
+
{{#if:{{#var:improvable}}|<h2>Improvement</h2>
 
{{ImprovementTableKai|{{{1|{{PAGENAME}}}}}|categories=true}}}}
 
{{ImprovementTableKai|{{{1|{{PAGENAME}}}}}|categories=true}}}}
 
{{#if:{{{trivia|}}}|<h2>Trivia</h2>
 
{{#if:{{{trivia|}}}|<h2>Trivia</h2>
 
{{{trivia}}}}}
 
{{{trivia}}}}}
 
{{#if:{{{see also|}}}|<h2>See also</h2>
 
{{#if:{{{see also|}}}|<h2>See also</h2>
{{{see also}}}
+
{{#if:{{#var:wikipedia}}|*[[wikipedia:{{#var:wikipedia}}|{{#var:wikipedia}} (Wikipedia)]]
{{Equipmentlist}}}}</includeonly><noinclude>
+
{{{see also}}}|{{{see also}}}}}
 +
{{Equipmentlist}}}}}}</includeonly><noinclude>
 
Layout template for [[:Category:Player equipment|equipment pages]].
 
Layout template for [[:Category:Player equipment|equipment pages]].
  
 
==Parameters==
 
==Parameters==
 
*'''[1]''': equipment name, <code>PAGENAME</code> is used by default.
 
*'''[1]''': equipment name, <code>PAGENAME</code> is used by default.
*'''ja''': Japanese description of the equipment, defaults to <code>?</code>.
+
*'''ja''': Japanese description of the equipment, defaults to <code>_info</code> (<code>api_info</code>) from equipment data module or to <code>?</code> when there is no <code>_info</code>.
 
*'''en''': English description of the equipment, defaults to <code>?</code>.
 
*'''en''': English description of the equipment, defaults to <code>?</code>.
*'''buildable''': set to <code>true</code> if equipment is buildable.
 
*'''improvement''': set to <code>true</code> if equipment is improvable.
 
 
*'''notes''': text in notes section.
 
*'''notes''': text in notes section.
 
*'''trivia ''': text in trivia section (optional).
 
*'''trivia ''': text in trivia section (optional).
 
*'''see also''': text in see also section (optional).
 
*'''see also''': text in see also section (optional).
 +
*'''header''': set to ignore and not generate anything after category tree (notes text and clear, improvement, trivia, see also sections, etc.).
 +
===Lua parameters===
 +
The following equipment data module fields are used:
 +
*<code>_info</code> for '''ja'''.
 +
*<code>_wikipedia</code>.
 +
*<code>_buildable</code>.
 +
*<code>_improvements</code>.
  
 
==Usage==
 
==Usage==
Line 32: Line 37:
 
<pre>
 
<pre>
 
{{EquipmentPage
 
{{EquipmentPage
|ja =
 
 
|en =  
 
|en =  
|buildable =
 
|improvement =
 
 
|notes =  
 
|notes =  
 
|trivia =  
 
|trivia =  
Line 44: Line 46:
 
<pre>
 
<pre>
 
{{EquipmentPage
 
{{EquipmentPage
|ja =  
+
|header = true
 
|en =  
 
|en =  
|buildable =
 
 
}}
 
}}
 
...
 
...
 
</pre>
 
</pre>
 
</noinclude>
 
</noinclude>

Revision as of 15:36, 27 October 2017

Layout template for equipment pages.

Parameters

  • [1]: equipment name, PAGENAME is used by default.
  • ja: Japanese description of the equipment, defaults to _info (api_info) from equipment data module or to ? when there is no _info.
  • en: English description of the equipment, defaults to ?.
  • notes: text in notes section.
  • trivia : text in trivia section (optional).
  • see also: text in see also section (optional).
  • header: set to ignore and not generate anything after category tree (notes text and clear, improvement, trivia, see also sections, etc.).

Lua parameters

The following equipment data module fields are used:

  • _info for ja.
  • _wikipedia.
  • _buildable.
  • _improvements.

Usage

Full page:

{{EquipmentPage
|en = 
|notes = 
|trivia = 
|see also = 
}}

Or only for the header (from infobox to category tree):

{{EquipmentPage
|header = true
|en = 
}}
...