Template:Categorize Location: Difference between revisions
From HorizonXI Wiki
Tag: Undo |
Tag: Undo |
||
Line 1: | Line 1: | ||
<includeonly><onlyinclude>{{categorize|{{{1|}}}|<!-- | <includeonly><onlyinclude>{{categorize|{{{1|}}}|<!-- | ||
-->{{#switch:{{lc:{{#sub:{{#explode:{{#explode:{{{location}}}|,|0}}|(|0}}|2|-2}}}} | -->{{#switch:{{lc:{{#sub:{{#explode:{{#explode:{{{location}}}|,|0}}|(|0}}|2|-2}}}} | ||
| southern san d'oria = [[Category: | | southern san d'oria = [[Category:{{{category type|}}}/Southern San d'Oria]][[Category:{{{category type|}}}/San d'Oria]] | ||
| northern san d'oria = [[Category: | | northern san d'oria = [[Category:{{{category type|}}}/Northern San d'Oria]][[Category:{{{category type|}}}/San d'Oria]] | ||
| port san d'oria = [[Category: | | port san d'oria = [[Category:{{{category type|}}}/Port San d'Oria]][[Category:{{{category type|}}}/San d'Oria]] | ||
| bastok markets = [[Category: | | bastok markets = [[Category:{{{category type|}}}/Bastok Markets]][[Category:{{{category type|}}}/Bastok]] | ||
| bastok mines = [[Category: | | bastok mines = [[Category:{{{category type|}}}/Bastok Mines]][[Category:{{{category type|}}}/Bastok]] | ||
| port bastok = [[Category: | | port bastok = [[Category:{{{category type|}}}/Port Bastok]][[Category:{{{category type|}}}/Bastok]] | ||
| metalworks | bastok metalworks = [[Category: | | metalworks | bastok metalworks = [[Category:{{{category type|}}}/Metalworks]][[Category:{{{category type|}}}/Bastok]] | ||
| windurst waters = [[Category: | | windurst waters = [[Category:{{{category type|}}}/Windurst Waters]][[Category:{{{category type|}}}/Windurst]]{{#if:{{#explode:{{#explode:{{{location}}}|(|0}}|,|1}}|<!-- | ||
-->[[Category:Windurst Waters {{#sub:{{#explode:{{#explode:{{#explode:{{{location}}}|(|0}}|,|1}}|{{!}}|1}}|0|-2}} | -->[[Category:{{{category type|}}}/Windurst Waters ({{#sub:{{#explode:{{#explode:{{#explode:{{{location}}}|(|0}}|,|1}}|{{!}}|1}}|0|-2}})]]<!---->|}} | ||
| windurst walls = [[Category: | | windurst walls = [[Category:{{{category type|}}}/Windurst Walls]][[Category:{{{category type|}}}/Windurst]] | ||
| windurst woods = [[Category: | | windurst woods = [[Category:{{{category type|}}}/Windurst Woods]][[Category:{{{category type|}}}/Windurst]] | ||
| port windurst = [[Category: | | port windurst = [[Category:{{{category type|}}}/Port Windurst]][[Category:{{{category type|}}}/Windurst]] | ||
| port jeuno = [[Category: | | port jeuno = [[Category:{{{category type|}}}/Port Jeuno]][[Category:{{{category type|}}}/Jeuno]] | ||
| lower jeuno = [[Category: | | lower jeuno = [[Category:{{{category type|}}}/Lower Jeuno]][[Category:{{{category type|}}}/Jeuno]] | ||
| upper jeuno = [[Category: | | upper jeuno = [[Category:{{{category type|}}}/Upper Jeuno]][[Category:{{{category type|}}}/Jeuno]] | ||
| ru'lude gardens = [[Category: | | ru'lude gardens = [[Category:{{{category type|}}}/Ru'Lude Gardens]][[Category:{{{category type|}}}/Jeuno]] | ||
| al zahbi = [[Category: | | al zahbi = [[Category:{{{category type|}}}/Al Zahbi]][[Category:{{{category type|}}}/Aht Urhgan]] | ||
| aht urhgan whitegate = [[Category: | | aht urhgan whitegate = [[Category:{{{category type|}}}/Aht Urhgan Whitegate]][[Category:{{{category type|}}}/Aht Urhgan]] | ||
| #default = {{#ifexist:{{#sub:{{#explode:{{#explode:{{{location}}}|,|0}}|(|0}}|2|-2}}|[[Category:{{#sub:{{#explode:{{#explode:{{{location}}}|,|0}}|(|0}}|2|-2 | | #default = {{#ifexist:{{#sub:{{#explode:{{#explode:{{{location}}}|,|0}}|(|0}}|2|-2}}|[[Category:{{{category type|}}}/{{#sub:{{#explode:{{#explode:{{{location}}}|,|0}}|(|0}}|2|-2}}]]}}}}<!-- | ||
-->}}</onlyinclude></includeonly> | -->}}</onlyinclude></includeonly> | ||
==Usage== | ==Usage== | ||
Line 38: | Line 38: | ||
</pre> | </pre> | ||
''will categorize the page as '' [[:Category:Selbina | ''will categorize the page as '' [[:Category:Quests/Selbina]] | ||
<pre> | <pre> | ||
Line 47: | Line 47: | ||
</pre> | </pre> | ||
''will categorize the page as ''[[:Category:Southern San d'Oria | ''will categorize the page as ''[[:Category:Quests/Southern San d'Oria]] ''and'' [[:Category:Quests/San d'Oria]] | ||
<pre> | <pre> | ||
Line 56: | Line 56: | ||
</pre> | </pre> | ||
''will categorize the page as ''[[:Category:Southern San d'Oria | ''will categorize the page as ''[[:Category:NPCs/Southern San d'Oria]] ''and'' [[:NPCs/Category:San d'Oria]] |
Revision as of 19:47, 14 August 2024
Usage
Template used to categorize according to a location. Arguments:
- location: expects a Template:Location return.
- category type: actual category type which is put after the location
Note: The template does not return anything, only categorizes based on the location input to the chosen type category of that area.
For city areas, will categorize to the city as well as the specific map/part of the city.
Examples
{{Categorize Location |location={{Location|Selbina|H-7}} |category type=Quests }}
will categorize the page as Category:Quests/Selbina
{{Categorize Location |location={{Location|Southern San d'Oria|H-7}} |category type=Quests }}
will categorize the page as Category:Quests/Southern San d'Oria and Category:Quests/San d'Oria
{{Categorize Location |location={{Location|Southern San d'Oria|H-7}} |category type=NPCs }}
will categorize the page as Category:NPCs/Southern San d'Oria and NPCs/Category:San d'Oria