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

Changes

Jump to navigation Jump to search
no edit summary
Line 1: Line 1: −
<includeonly>{{#if:{{{1|}}}|<div style="position:relative;">[[File:{{#explode:{{{pagename|{{PAGENAME}}}}}|/|0}} {{#explode:{{{pagename|{{PAGENAME}}}}}|/|1}} Map.png|{{{size|700}}}px|link={{{link|}}}]]{{{1}}}</div>|[[File:{{#explode:{{{pagename|{{PAGENAME}}}}|/|0}} {{#explode:{{{pagename|{{PAGENAME}}}}|/|1}} Map.png|{{{size|700}}}px|link={{{link|}}}]]}}</includeonly>
+
<includeonly>{{#vardefine:map|{{#ifeq:{{#sub:{{{page|{{PAGENAME}}}}}|0|5}}|Phase|{{#sub:{{{page|{{PAGENAME}}}}}|0|7}}_{{SUBPAGENAME}}_Map.png|{{#ifeq:{{#explode:{{{page|{{PAGENAME}}}}}|/|0}}|Sandbox|{{#explode:{{{page|{{PAGENAME}}}}}|/|0}}_{{#explode:{{{page|{{PAGENAME}}}}}|/|1}}_{{#explode:{{{page|{{PAGENAME}}}}}|/|2}}_Map.png|<!--{{#ifeq:{{#sub:{{{page|{{PAGENAME}}}}}|0|5}}|World|{{#explode:{{{page|{{PAGENAME}}}}}|/|1}}_Map.png|-->{{#explode:{{{page|{{PAGENAME}}}}}|/|0}}_{{#explode:{{{page|{{PAGENAME}}}}}|/|1}}_Map.png}}<!--}}-->}}}}{{#if:{{{1|}}}|<div class="map-image"><!--{{#ifexist:File:{{#var:map}}|-->[[File:{{#var:map}}|{{{size|700}}}px|link={{{link|}}}]]<!--|[[File:Catbomb.png|link=|{{#var:map}} not found]]}}-->{{{1}}}</div>|<div><!--{{#ifexist:File:{{#var:map}}|-->[[File:{{#var:map}}|{{{size|700}}}px|link={{{link|}}}]]<!--|[[File:Catbomb.png|link=|{{#var:map}} not found]]}}--></div>}}</includeonly><noinclude>
<noinclude>
+
Puts a map on the page, used on enemy pattern pages.
Puts an event map on the page, based on PAGENAME (first and second parts of it; used on enemy patterns pages).
+
==Parameters==
 
+
===page===
Usage:
+
Defaults to <code><nowiki>{{PAGENAME}}</nowiki></code>, if <code>page</code> is <code><area>/<map>/...</code>, then <code><area> <map> Map.png</code> is the file used for map image. <code><area></code> is event name for event maps or world name for regular maps.
<pre>
+
===size===
{{Event/Map}}
+
Optional, size of the map image, defaults to 700.
</pre>
+
===link===
(has optional '''size''' and '''link''' parameters)
+
Optional, link for the map image, no link by default.
 
+
===[1]===
or
+
Use to overlay clickable nodes with [[Template:Map/ImageNode]].
 
+
==Examples==
<pre>
+
===Just a map===
{{Event/Map|
+
<pre>{{Map/Image}}</pre>
{{Event/MapNode|...}}
+
===With clickable nodes===
 +
<pre>{{Map/Image|
 +
{{Map/ImageNode|...}}
 
...
 
...
}}
+
}}</pre>
</pre>
+
===Specifying a page===
 
+
<pre>{{Map/Image|page=Fall 2020 Event/E-1}}</pre>
TODO: use #ifexist and have a non-existing map banner.
+
{{Map/Image|page=Fall 2020 Event/E-1}}
 +
==Tests==
 +
* [[Template:Map/Image/Test]]
 
</noinclude>
 
</noinclude>
advmod, cssedit, janitor, Moderators, prechecked, Widget editors
6,955

edits

Navigation menu