• 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/Link"

From Kancolle Wiki
Jump to navigation Jump to search
(link_category compatibility)
 
(23 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly>{{#iferror:<span class="advanced-tooltip">{{#if:{{{image|}}}|{{EquipmentCardKai|{{{1|}}}|size={{{image|}}}|link={{#if:{{{link|}}}|{{{link|}}}|{{{1|}}}}}}}|{{#if:{{{link|}}}|[[{{{link}}}|{{#if:{{{2|}}}|{{{2|}}}|{{{1|}}}}}]]|[[{{{1|}}}|{{#if:{{{2|}}}|{{{2|}}}|{{{1|}}}}}]]}}}}<div class="tooltip-contents">{{EquipmentCardKai|{{{1|}}}}}</div></span>|{{#if:{{{link|}}}|[[{{{link}}}|{{#if:{{{2|}}}|{{{2|}}}|{{{1|}}}}}]]|[[{{{1}}}|{{#if:{{{2|}}}|{{{2|}}}|{{{1|}}}}}]]}}}}</includeonly><noinclude>
+
<noinclude>{{AssetTemplateList}}</noinclude><includeonly><!--{{{{{subst|safesubst:}}}#invoke:EquipmentLink|format}}-->{{Link|type=Equipment|asset=Card|size={{{size|160x160px}}}|text={{{text|}}}|link={{{link|}}}|link_category={{{link_category|}}}|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}}}</includeonly><noinclude>
{{Warning
+
Links with equipment card tooltips.
|This template uses [[Template:EquipmentCardKai]] which calls Lua code on each inclusion, there is an upper bound on the number of times this template can be used on a page before it kills the page (since the change in [[Thread:457712|Wikia Lua engine in July 2016]], the previous engine has a greater limit and only caused Lua script errors at worst).
 
}}
 
  
Links to equipment pages with card image tooltips.
+
==Parameters==
 +
===[1], [2], ...===
 +
Equipment to show in tooltips. <s>If <code>-</code>, inserts <code><nowiki><br /></nowiki></code> in tooltip.</s>
 +
===text===
 +
Link text, default to <code>[1]</code>.
 +
===link===
 +
Link target, default to <code>[1]</code>.
 +
===image===
 +
<s>Set to show equipment card image (using <code>[1]</code>) instead of text link, e.g., <code>image=true</code> to show a 50px equipment card image or <code>image=60px</code> for a 60px image (other parameters are still applicable).</s>
 +
===icon===
 +
<s>Set to show equipment icon before text or image link.</s>
 +
===size===
 +
Size of equipment card images in tooltip, defaults to full size.
  
 +
==Examples==
 
<pre>{{EquipmentLink|Prototype 51cm Twin Gun Mount}}</pre>
 
<pre>{{EquipmentLink|Prototype 51cm Twin Gun Mount}}</pre>
 
 
{{EquipmentLink|Prototype 51cm Twin Gun Mount}}
 
{{EquipmentLink|Prototype 51cm Twin Gun Mount}}
 
 
<pre>{{EquipmentLink|Type 4 Passive Sonar|link=Sonar}}</pre>
 
<pre>{{EquipmentLink|Type 4 Passive Sonar|link=Sonar}}</pre>
 
 
{{EquipmentLink|Type 4 Passive Sonar|link=Sonar}}
 
{{EquipmentLink|Type 4 Passive Sonar|link=Sonar}}
 +
<pre>{{EquipmentLink|Prototype 51cm Twin Gun Mount|text=P51cm}}</pre>
 +
{{EquipmentLink|Prototype 51cm Twin Gun Mount|text=P51cm}}
 +
<pre>{{EquipmentLink|Prototype 51cm Twin Gun Mount|image=true}}</pre>
 +
{{EquipmentLink|Prototype 51cm Twin Gun Mount|image=true}}
 +
<pre>{{EquipmentLink|Prototype 51cm Twin Gun Mount|image=60px}}</pre>
 +
{{EquipmentLink|Prototype 51cm Twin Gun Mount|image=60px}}
 +
<pre>{{EquipmentLink|Prototype 51cm Twin Gun Mount|icon=x}}</pre>
 +
{{EquipmentLink|Prototype 51cm Twin Gun Mount|icon=x}}
 +
<pre>{{EquipmentLink|Prototype 51cm Twin Gun Mount|image=50px|icon=x}}</pre>
 +
{{EquipmentLink|Prototype 51cm Twin Gun Mount|image=50px|icon=x}}
 +
<pre>{{EquipmentLink|Prototype 51cm Twin Gun Mount|text=true|image=50px}}</pre>
 +
{{EquipmentLink|Prototype 51cm Twin Gun Mount|text=true|image=50px}}
 +
<pre>{{EquipmentLink|Prototype 51cm Twin Gun Mount|text=P51|image=50px|icon=x}}</pre>
 +
{{EquipmentLink|Prototype 51cm Twin Gun Mount|text=P51|image=50px|icon=x}}
 +
<pre>{{EquipmentLink|Type 4 Passive Sonar|link=Sonar|text=T4|icon=true}}</pre>
 +
{{EquipmentLink|Type 4 Passive Sonar|link=Sonar|text=T4|icon=x}}
 +
<pre>{{EquipmentLink|text=Sonars|link=sonar|icon=x|Type 93 Passive Sonar|Type 3 Active Sonar|Type 0 Passive Sonar|Type 4 Passive Sonar}}</pre>
 +
{{EquipmentLink|text=Sonars|link=sonar|icon=x|Type 93 Passive Sonar|Type 3 Active Sonar|Type 0 Passive Sonar|Type 4 Passive Sonar}}
 +
<pre>
 +
{{EquipmentLink
 +
|text=Sonars
 +
|link=sonar
 +
|icon=x
 +
|size=100px
 +
|Type 93 Passive Sonar
 +
|Type 3 Active Sonar
 +
|-
 +
|Type 0 Passive Sonar
 +
|Type 4 Passive Sonar
 +
}}
 +
</pre>
 +
{{EquipmentLink
 +
|text = Sonars
 +
|link = Sonar
 +
|icon = x
 +
|size = 100px
 +
|Type 93 Passive Sonar
 +
|Type 3 Active Sonar
 +
|-
 +
|Type 0 Passive Sonar
 +
|Type 4 Passive Sonar
 +
}}
 +
<pre>{{EquipmentLink|Abyssal Cat Fighter Kai}}</pre>
 +
{{EquipmentLink|Abyssal Cat Fighter Kai}}
  
<pre>{{EquipmentLink|Prototype 51cm Twin Gun Mount|P51cm}}</pre>
+
==Tests==
 
+
<pre>{{EquipmentLink|?}}</pre>
{{EquipmentLink|Prototype 51cm Twin Gun Mount|P51cm}}
+
{{EquipmentLink|?}}
 
+
<pre>{{EquipmentLink}}</pre>
<pre>{{EquipmentLink|Prototype 51cm Twin Gun Mount|image=50px}}</pre>
+
{{EquipmentLink}}
 
+
<pre>{{EquipmentLink|icon=x}}</pre>
{{EquipmentLink|Prototype 51cm Twin Gun Mount|image=50px}}
+
{{EquipmentLink|icon=x}}
 
 
 
</noinclude>
 
</noinclude>

Latest revision as of 07:24, 9 May 2021

[edit] Asset Template List
Template:Asset Other Templates
Template:Banner Template:Card Template:Link Others

Links with equipment card tooltips.

Parameters

[1], [2], ...

Equipment to show in tooltips. If -, inserts <br /> in tooltip.

text

Link text, default to [1].

link

Link target, default to [1].

image

Set to show equipment card image (using [1]) instead of text link, e.g., image=true to show a 50px equipment card image or image=60px for a 60px image (other parameters are still applicable).

icon

Set to show equipment icon before text or image link.

size

Size of equipment card images in tooltip, defaults to full size.

Examples

{{EquipmentLink|Prototype 51cm Twin Gun Mount}}

Prototype 51cm Twin Gun MountPrototype 51cm Twin Gun Mount

{{EquipmentLink|Type 4 Passive Sonar|link=Sonar}}

Type 4 Passive SonarType 4 Passive Sonar

{{EquipmentLink|Prototype 51cm Twin Gun Mount|text=P51cm}}

P51cmPrototype 51cm Twin Gun Mount

{{EquipmentLink|Prototype 51cm Twin Gun Mount|image=true}}

Prototype 51cm Twin Gun MountPrototype 51cm Twin Gun Mount

{{EquipmentLink|Prototype 51cm Twin Gun Mount|image=60px}}

Prototype 51cm Twin Gun MountPrototype 51cm Twin Gun Mount

{{EquipmentLink|Prototype 51cm Twin Gun Mount|icon=x}}

Prototype 51cm Twin Gun MountPrototype 51cm Twin Gun Mount

{{EquipmentLink|Prototype 51cm Twin Gun Mount|image=50px|icon=x}}

Prototype 51cm Twin Gun MountPrototype 51cm Twin Gun Mount

{{EquipmentLink|Prototype 51cm Twin Gun Mount|text=true|image=50px}}

truePrototype 51cm Twin Gun Mount

{{EquipmentLink|Prototype 51cm Twin Gun Mount|text=P51|image=50px|icon=x}}

P51Prototype 51cm Twin Gun Mount

{{EquipmentLink|Type 4 Passive Sonar|link=Sonar|text=T4|icon=true}}

T4Type 4 Passive Sonar

{{EquipmentLink|text=Sonars|link=sonar|icon=x|Type 93 Passive Sonar|Type 3 Active Sonar|Type 0 Passive Sonar|Type 4 Passive Sonar}}

SonarsType 93 Passive Sonar
Type 3 Active Sonar
Type 0 Passive Sonar
Type 4 Passive Sonar

{{EquipmentLink
|text=Sonars
|link=sonar
|icon=x
|size=100px
|Type 93 Passive Sonar
|Type 3 Active Sonar
|-
|Type 0 Passive Sonar
|Type 4 Passive Sonar
}}

SonarsType 93 Passive Sonar
Type 3 Active Sonar
-
Type 0 Passive Sonar
Type 4 Passive Sonar

{{EquipmentLink|Abyssal Cat Fighter Kai}}

Abyssal Cat Fighter KaiAbyssal Cat Fighter Kai

Tests

{{EquipmentLink|?}}

??

{{EquipmentLink}}

[[|]]Catbomb.png

{{EquipmentLink|icon=x}}

[[|]]Catbomb.png