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
Prevent duplicate NPC galleries and add an empty state
Use native image field fallback without ParserFunctions
 
(2 intermediate revisions by the same user not shown)
Line 8: Line 8:
<div class="hw-infobox-title">{{{name|{{PAGENAME}}}}}</div>
<div class="hw-infobox-title">{{{name|{{PAGENAME}}}}}</div>
<div class="hw-infobox-badge">Documented Region</div>
<div class="hw-infobox-badge">Documented Region</div>
<div class="hw-infobox-image" role="group" aria-label="Image for {{{name|{{PAGENAME}}}}}">
{{{image|<div class="hw-infobox-image-empty">No Picture Uploaded</div>}}}
</div>
<div class="hw-infobox-heading">Field Information</div>
<div class="hw-infobox-heading">Field Information</div>
<div class="hw-infobox-blurb">{{{blurb|No description available.}}}</div>
<div class="hw-infobox-blurb">{{{blurb|No description available.}}}</div>
Line 14: Line 17:
<div class="hw-infobox-heading">Herbs Found Here</div>
<div class="hw-infobox-heading">Herbs Found Here</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 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 class="hw-location-npc-section" aria-label="NPCs in {{{name|{{PAGENAME}}}}}">
<div class="hw-location-npc-overline">PEOPLE OF THE REGION</div>
<div class="hw-location-npc-title" role="heading" aria-level="2">NPCs</div>
<div class="hw-location-npc-copy">{{{npc paragraph|The following NPCs can be found in this location.}}}</div>
<div class="hw-location-npc-gallery">{{{npc gallery|<p class="hw-location-npc-empty">No NPCs documented.</p>}}}</div>
</div>
</div>
</includeonly><noinclude>
</includeonly><noinclude>
This template displays a location dossier, automatically lists herbs whose centralized record names this location, and can display an NPC paragraph and captioned image gallery.
This template displays a location dossier and automatically lists herbs whose centralized record names this location. Place NPC content later on the page with {{Location NPCs}}.


== Usage ==
== Usage ==
Line 30: Line 27:
| blurb = A short description of the location.
| blurb = A short description of the location.
| npc count = 1
| npc count = 1
| npc paragraph = A short introduction to the people found here.
| npc gallery =
<gallery widths="180" heights="200">
File:Example NPC.png|[[Example NPC]]
</gallery>
}}
}}
</pre>
</pre>
Set <code>| image = [[File:Example.png|frameless|600px]]</code> to display an uploaded file in the infobox. Leave it empty to show “No Picture Uploaded”.
[[Category:Infobox templates]]
[[Category:Infobox templates]]
</noinclude>
</noinclude>

Latest revision as of 09:35, 29 July 2026

This template displays a location dossier and automatically lists herbs whose centralized record names this location. Place NPC content later on the page with

PEOPLE OF THE REGION
The following NPCs can be found in this location.

.

Usage

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

Set | image = File:Example.png to display an uploaded file in the infobox. Leave it empty to show “No Picture Uploaded”.

Contents