Template:NPC/Region.dpl: Difference between revisions
From Horizon Wiki Mirror
Content deleted Content added
imported>Aramachus Created page with "<includeonly><onlyinclude>{{#dpl: | title=<!-- -->{{#explode:{{#dpl: | title={{{name}}} | include={Location}:1,{NPC}:name | layout=,,, }}|{{{name}}}}}<!-- --> | include={Zone Infobox}:Region | layout=,,, }}</onlyinclude></includeonly> ==Usage== Uses the NPCs location field to extract the location and subsequently looks at that location page and extracts the region (from region parameter of Template:Zone Infobox). Uses explode parser function with the name of the npc..." |
imported>Aramachus mNo edit summary |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
<includeonly><onlyinclude>{{#dpl: |
<includeonly><onlyinclude>{{#dpl: |
||
| title=<!-- |
| title=<!-- |
||
-->{{#explode:{{#dpl: |
-->{{#explode:{{#dpl:<!-- |
||
| title={{{name}}} |
-->| title={{{name}}}<!-- |
||
| include={Location}:1,{NPC}:name |
-->| include={Location}:1,{NPC}:name<!-- |
||
| layout=,,, |
-->| layout=,,,<!-- |
||
-->| skipthispage = no<!-- |
|||
}}|{{{name}}}}} |
-->}}|{{{name}}}}} |
||
--> |
|||
| include={Zone Infobox}:Region |
| include={Zone Infobox}:Region,{Zone/Infobox}:Region |
||
| layout=,,, |
| layout=,,, |
||
}}</onlyinclude></includeonly> |
}}</onlyinclude></includeonly> |
||
==Usage== |
==Usage== |
||
Uses the NPCs |
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). |
||
Uses explode parser function with the name of the npc to work around the possibility of having multiple Template:Location on the page and selecting only the first. Not the best workaround but couldn't find a way to do it better. |
|||
===Examle=== |
===Examle=== |
||
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}}
Extension:DynamicPageList4 (DPL4), version 4.0.0: Error: No selection criteria found! You must use at least one of the following parameters: category, namespace, titlematch, linksto, uses, createdby, modifiedby, lastmodifiedby, or their 'not' variants