Template:NPC/Region.dpl: Difference between revisions

From HorizonXI Wiki
(changed input to work with template location return instead of npc name)
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<includeonly><onlyinclude>{{#dpl:
<includeonly><onlyinclude>{{#dpl:
| title=<!--
| title=<!--
-->{{#sub:<!--
-->{{#explode:{{#dpl:<!--
-->{{#explode:{{{location}}}|(|0}}<!--
-->| title={{{name}}}<!--
-->|2|-2}}
-->| include={Location}:1,{NPC}:name<!--
| include={Zone Infobox}:Region
-->| layout=,,,<!--
-->| skipthispage = no<!--
-->}}|{{{name}}}}}
| include={Zone Infobox}:Region,{Zone/Infobox}:Region
| layout=,,,
| layout=,,,
}}</onlyinclude></includeonly>
}}</onlyinclude></includeonly>
<!--{{#explode:{{#dpl:
| title={{{name}}}
| include={Location}:1,{NPC}:name
| layout=,,,
}}|{{{name}}}}}
-->
==Usage==
==Usage==


Uses the NPCs location entry to extract the location and subsequently looks at that location page and extracts the region (from region parameter of Template:Zone Infobox).
Uses the NPCs name entry to extract the location and subsequently looks at that location page and extracts the region (from region parameter of Template:Zone Infobox).  
 
Requires the location to be entered as a [[Template:Location]]. Uses explode parser function with the character "(" to split the return of [[Template:Location]] and obtain the area as the 0th argument of that.  


===Examle===
===Examle===
Line 23: Line 18:
[[Medicine Axe]] is a NPC at the Outpost of the Valkurm Dunes. The corresponding region is Zulkheim.  
[[Medicine Axe]] is a NPC at the Outpost of the Valkurm Dunes. The corresponding region is Zulkheim.  


<pre>{{Template:NPC/Region.dpl|location={{Location|Valkurm Dunes|H-7}}</pre>
<pre>{{Template:NPC/Region.dpl|name=Medicine Axe}}</pre>


{{Template:NPC/Region.dpl|location={{Location|Valkurm Dunes|H-7}}}}
{{Template:NPC/Region.dpl|name=Medicine Axe}}

Latest revision as of 23:30, 8 April 2024

Usage

Uses the NPCs name entry to extract the location and subsequently looks at that location page and extracts the region (from region parameter of Template:Zone Infobox).

Examle

Medicine Axe is a NPC at the Outpost of the Valkurm Dunes. The corresponding region is Zulkheim.

{{Template:NPC/Region.dpl|name=Medicine Axe}}

Zulkheim