Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Location: Difference between revisions

Template page
Hide empty image rows and standardize location infobox markup
Use aggregate Cargo count for known herbs
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>
<includeonly>
<div class="hw-record-banner hw-record-banner--location">
<div class="hw-record-code">WORLD ATLAS · LOCATION DOSSIER</div>
<div class="hw-record-name">{{{name|{{PAGENAME}}}}}</div>
<div class="hw-record-summary">{{{blurb|No description available.}}}</div>
</div>
<div class="hw-infobox hw-location-infobox">
<div class="hw-infobox hw-location-infobox">
<div class="hw-infobox-title">{{{name|{{PAGENAME}}}}}</div>
<div class="hw-infobox-title">{{{name|{{PAGENAME}}}}}</div>
{{#if:{{{image|}}}|
<div class="hw-infobox-badge">Documented Region</div>
<div class="hw-infobox-image">[[File:{{{image}}}|260px|center|alt={{{name|{{PAGENAME}}}}}]]</div>
<div class="hw-infobox-heading">Field Information</div>
}}
<div class="hw-infobox-heading">Information</div>
<div class="hw-infobox-blurb">{{{blurb|No description available.}}}</div>
<div class="hw-infobox-blurb">{{{blurb|No description available.}}}</div>
<div class="hw-infobox-row">
<div class="hw-infobox-row"><div class="hw-infobox-label">Known NPCs</div><div class="hw-infobox-value">{{{npc count|0}}}</div></div>
<div class="hw-infobox-label">NPC Count</div>
<div class="hw-infobox-row"><div class="hw-infobox-label">Known Herbs</div><div class="hw-infobox-value">{{#cargo_query:tables=Herbs|fields=COUNT(*)=Count|where=Location='{{{name|{{PAGENAME}}}}}'|format=plainlist}}</div></div>
<div class="hw-infobox-value">{{{npc count|0}}}</div>
<div class="hw-infobox-heading">Herbs Found Here</div>
</div>
<div class="hw-infobox-blurb hw-location-herb-list">{{#cargo_query:tables=Herbs|fields=_pageName|where=Location='{{{name|{{PAGENAME}}}}}'|order by=Name|format=list|delimiter= · |default=None documented.}}</div>
</div>
</div>
</includeonly><noinclude>
</includeonly><noinclude>
This template displays a location dossier and automatically lists herbs whose centralized record names this location.
== Usage ==
== Usage ==
<pre>
<pre>
{{Location
{{Location
| name = Mainland
| name = Mainland
| image = Example.png
| blurb = A short description of the location.
| blurb = A short description of the location.
| npc count = 1
| npc count = 1
}}
}}
</pre>
</pre>
The image row is hidden when no image is supplied.
[[Category:Infobox templates]]
[[Category:Infobox templates]]
</noinclude>
</noinclude>

Latest revision as of 17:08, 26 July 2026

This template displays a location dossier and automatically lists herbs whose centralized record names this location.

Usage

{{Location
| name = Mainland
| blurb = A short description of the location.
| npc count = 1
}}
Contents