Difference between revisions of "Location info"

(created location info template)
 
m
 
(28 intermediate revisions by the same user not shown)
Line 6: Line 6:
 
-->{{#vardefine:typeText|{{#switch:{{lc:{{{category|}}}}}
 
-->{{#vardefine:typeText|{{#switch:{{lc:{{{category|}}}}}
 
|camps=[[Camp]]
 
|camps=[[Camp]]
|cities=[[City]]
 
 
|dungeons=[[Dungeon]]
 
|dungeons=[[Dungeon]]
|zones=[[Zone]]
+
|safe zones=[[Zone#Safe Zones|Safe Zone]]
 +
|protected zones=[[Zone#Lands under the Protection of the King|Lands under the Protection of the King]]
 +
|battleground zones=[[Zones#The Battleground of the King|The Battleground of the King]]
 
}}}}<!--
 
}}}}<!--
 
-->{{#if:{{{name|}}}<!-- if a name parameter is not given
 
-->{{#if:{{{name|}}}<!-- if a name parameter is not given
 
-->||{{#if:{{#var:typeText}}<!-- if the type is correct (i.e. typeText exists)
 
-->||{{#if:{{#var:typeText}}<!-- if the type is correct (i.e. typeText exists)
-->|[[Category:{{sc|{{{category}}}}}]]}}}}<!-- add to category
+
-->|[[Category:{{sc|{{{category|Locations}}}}}]]}}}}<!-- add to category
  
 
quests
 
quests
-->{{#arraydefine:questText|{{{quests}}}|,}}<!--
+
-->{{#arraydefine:poiText|{{{points of interest}}}|;}}<!--
 +
 
 +
connections
 +
-->{{#arraydefine:connectionsText|{{{connections}}}|;}}<!--
  
 
TABLE -->
 
TABLE -->
Line 22: Line 26:
 
| colspan="2" | <center><!--
 
| colspan="2" | <center><!--
 
location map
 
location map
-->{{#if:{{{map|}}}<!-- if map exists
+
-->{{#if:{{{image|}}}<!-- if image exists
-->|[[{{{map}}}|278px]]<!-- use provided map
+
-->|[[{{{image}}}|278px]]<br><small>''Click to enlarge.''</small><!-- use provided image
-->|{{#vardefine:defaultMap|File:{{#replace:{{#titleparts:{{PAGENAME}}}}|:|-}}.jpg}}<!-- else use default map
+
-->|{{#vardefine:defaultImage|File:{{#replace:{{#titleparts:{{PAGENAME}}}}|:|-}}.jpg}}<!-- else use default image
-->{{#ifexist:{{#var:defaultMap}}<!-- if default map exists
+
-->{{#ifexist:{{#var:defaultImage}}<!-- if default image exists
-->|[[{{#var:defaultMap}}|278px]]<!-- use default map
+
-->|[[{{#var:defaultImage}}|278px]]<br><small>''Click to enlarge.''</small><!-- use default image
-->|[[{{#var:defaultMap}}|Upload map.]]}}}}<!-- else prompt for map upload
+
-->|[[{{#var:defaultImage}}|Upload location image or map.]]}}}}<!-- else prompt for image upload
 
--></center>
 
--></center>
 
|-
 
|-
 
! colspan="2" class="{{#switch:{{lc:{{{category|}}}}}
 
! colspan="2" class="{{#switch:{{lc:{{{category|}}}}}
 
|camps=location-camp
 
|camps=location-camp
|cities=location-city
 
 
|dungeons=location-dungeon
 
|dungeons=location-dungeon
|zone=location-zone
+
|zones=location-zone
|#default=location-city<!-- default location -->
+
|#default=location-zone<!-- default location -->
 
}}" | <center>{{{name|{{PAGENAME}}}}}</center><!-- name -->
 
}}" | <center>{{{name|{{PAGENAME}}}}}</center><!-- name -->
 
|-
 
|-
{{#if:{{#var:typeText}}|{{!}}class="skill-infobox-row-heading"{{!}}'''Type'''{{!}}{{!}}class="skill-infobox-row-data"{{!}}{{#var:typeText}}}}
+
{{#if:{{#var:typeText}}|{{InfoboxRow|'''Type'''|{{#var:typeText}}}}}}
 +
|-
 +
{{#if:{{{points of interest|}}}|{{InfoboxRow|'''Points of Interest'''|{{#arrayprint:poiText|<br>|@|{{icon|@ Icon.png}} @}}}}}}
 
|-
 
|-
{{#if:{{{quests|}}}|{{!}}class="skill-infobox-row-heading"{{!}}'''Involved In'''{{!}}{{!}}class="skill-infobox-row-data"{{!}}{{#arrayprint:questText|<br>|@|[[@]]}}}}<!-- formats the quests array -->
+
{{#if:{{{connections|}}}|{{InfoboxRow|'''Connected to'''|{{#arrayprint:connectionsText|<br>|@|@}}}}}}
 
|-
 
|-
<!--
 
loading screen
 
-->{{#vardefine:loadingScreen|File:{{#replace:{{#titleparts:{{PAGENAME}}}}|:|-}} loading screen.jpg}}<!-- define loading screen
 
-->{{#ifexist:{{#var:loadingScreen}}|{{!}}colspan="2"{{!}}<center>[[{{#var:loadingScreen}}|278px]]<br><small>''Loading screen''</small></center>}}
 
 
|}</div><!--
 
|}</div><!--
 
DESCRIPTION
 
DESCRIPTION
-->{{{description|{{error|No description was provided. Add a description parameter.}}}}}</includeonly><noinclude>{{Item info/Documentation}}</noinclude>
+
-->{{{description|{{error|No description was provided. Add a description parameter.}}}}}</includeonly><noinclude>{{{{PAGENAME}}/Documentation}}</noinclude>

Latest revision as of 21:53, 24 June 2024

Description[edit]

Displays an information page about an location.

Usage[edit]

{{Location info|<image=image>|<name=name>|<description=description>|<category=category>|<quests=quests>|<loading screen=loading screen>}}

Parameters[edit]

Arrow.pngimage: A map or image of the location.
Optional. Defaults to '{{PAGENAME}}.jpg'.
Notes: Only use if the image name differs from the name of the page.
Arrow.pngname: The name of the location.
Optional. Defaults to '{{PAGENAME}}'.
Notes: Only use if the template is on a different page to the location's main article.
Arrow.pngdescription: A description of the location.
Optional.
Arrow.pngcategory: The location's category.
Optional.

Possible categories:

camps
dungeons
safe zones
protected zones (see Zone)
battleground zones (see Zone)
Arrow.pngpoints of interest: The semicolon-separated names of points of interest in the location.
Optional.
Notes: Add your own wiki links.
Arrow.pngconnections: The semicolon-separated names of zones connected to the location.
Optional.
Notes: Add your own wiki links. The cardinal direction is usually specified in brackets after the location name.

Errors[edit]

No description was provided. Add a description parameter.