Template:Categorize Location: Difference between revisions

From HorizonXI Wiki
(changed categorization to Category:Location/Type)
(added chateau d'oraguille, others for mhaura selbina tavnazia and unallocated as category for whatever isnt caught by the switch command)
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}}}}<!--
 
sandoria
-->
| southern san d'oria = [[Category:Southern San d'Oria/{{{category type|}}}]][[Category:San d'Oria/{{{category type|}}}]]
| southern san d'oria = [[Category:Southern San d'Oria/{{{category type|}}}]][[Category:San d'Oria/{{{category type|}}}]]
| northern san d'oria = [[Category:Northern San d'Oria/{{{category type|}}}]][[Category:San d'Oria/{{{category type|}}}]]
| northern san d'oria = [[Category:Northern San d'Oria/{{{category type|}}}]][[Category:San d'Oria/{{{category type|}}}]]
| port san d'oria = [[Category:Port San d'Oria/{{{category type|}}}]][[Category:San d'Oria/{{{category type|}}}]]
| port san d'oria = [[Category:Port San d'Oria/{{{category type|}}}]][[Category:San d'Oria/{{{category type|}}}]]
| chateau d'oraguille = [[Category:Chateau Oraguille/{{{category type|}}}]][[Category:San d'Oria/{{{category type|}}}]]<!--
bastok
-->
| bastok markets = [[Category:Bastok Markets/{{{category type|}}}]][[Category:Bastok/{{{category type|}}}]]
| bastok markets = [[Category:Bastok Markets/{{{category type|}}}]][[Category:Bastok/{{{category type|}}}]]
| bastok mines = [[Category:Bastok Mines/{{{category type|}}}]][[Category:Bastok/{{{category type|}}}]]
| bastok mines = [[Category:Bastok Mines/{{{category type|}}}]][[Category:Bastok/{{{category type|}}}]]
| port bastok = [[Category:Port Bastok/{{{category type|}}}]][[Category:Bastok/{{{category type|}}}]]
| port bastok = [[Category:Port Bastok/{{{category type|}}}]][[Category:Bastok/{{{category type|}}}]]
| metalworks | bastok metalworks = [[Category:Metalworks/{{{category type|}}}]][[Category:Bastok/{{{category type|}}}]]
| metalworks | bastok metalworks = [[Category:Metalworks/{{{category type|}}}]][[Category:Bastok/{{{category type|}}}]]<!--
 
windurst
-->
| windurst waters = [[Category:Windurst Waters/{{{category type|}}}]][[Category:Windurst/{{{category type|}}}]]{{#if:{{#explode:{{#explode:{{{location}}}|(|0}}|,|1}}|<!--
| windurst waters = [[Category:Windurst Waters/{{{category type|}}}]][[Category:Windurst/{{{category type|}}}]]{{#if:{{#explode:{{#explode:{{{location}}}|(|0}}|,|1}}|<!--
-->[[Category:Windurst Waters ({{#sub:{{#explode:{{#explode:{{#explode:{{{location}}}|(|0}}|,|1}}|{{!}}|1}}|0|-2}})/{{{category type|}}}]]<!---->|}}
-->[[Category:Windurst Waters ({{#sub:{{#explode:{{#explode:{{#explode:{{{location}}}|(|0}}|,|1}}|{{!}}|1}}|0|-2}})/{{{category type|}}}]]<!---->|}}
| windurst walls = [[Category:Windurst Walls/{{{category type|}}}]][[Category:Windurst/{{{category type|}}}]]
| windurst walls = [[Category:Windurst Walls/{{{category type|}}}]][[Category:Windurst/{{{category type|}}}]]
| windurst woods = [[Category:Windurst Woods/{{{category type|}}}]][[Category:Windurst/{{{category type|}}}]]
| windurst woods = [[Category:Windurst Woods/{{{category type|}}}]][[Category:Windurst/{{{category type|}}}]]
| port windurst = [[Category:Port Windurst/{{{category type|}}}]][[Category:Windurst/{{{category type|}}}]]
| port windurst = [[Category:Port Windurst/{{{category type|}}}]][[Category:Windurst/{{{category type|}}}]]<!--
 
jeuno
-->
| port jeuno = [[Category:Port Jeuno/{{{category type|}}}]][[Category:Jeuno/{{{category type|}}}]]
| port jeuno = [[Category:Port Jeuno/{{{category type|}}}]][[Category:Jeuno/{{{category type|}}}]]
| lower jeuno = [[Category:Lower Jeuno/{{{category type|}}}]][[Category:Jeuno/{{{category type|}}}]]
| lower jeuno = [[Category:Lower Jeuno/{{{category type|}}}]][[Category:Jeuno/{{{category type|}}}]]
| upper jeuno = [[Category:Upper Jeuno/{{{category type|}}}]][[Category:Jeuno/{{{category type|}}}]]
| upper jeuno = [[Category:Upper Jeuno/{{{category type|}}}]][[Category:Jeuno/{{{category type|}}}]]
| ru'lude gardens = [[Category:Ru'Lude Gardens/{{{category type|}}}]][[Category:Jeuno/{{{category type|}}}]]
| ru'lude gardens = [[Category:Ru'Lude Gardens/{{{category type|}}}]][[Category:Jeuno/{{{category type|}}}]]<!--
 
aht urhgan
-->
| al zahbi = [[Category:Al Zahbi/{{{category type|}}}]][[Category:Aht Urhgan/{{{category type|}}}]]
| al zahbi = [[Category:Al Zahbi/{{{category type|}}}]][[Category:Aht Urhgan/{{{category type|}}}]]
| aht urhgan whitegate = [[Category:Aht Urhgan Whitegate/{{{category type|}}}]][[Category:Aht Urhgan/{{{category type|}}}]]
| nashmau = [[Category:Nashmau/{{{category type|}}}]][[Category:Aht Urhgan/{{{category type|}}}]]
| kazham | norg | rabao = [[Category:{{#sub:{{#explode:{{#explode:{{{location}}}|,|0}}|(|0}}|2|-2}}/{{{category type|}}}]][[Category:Outlands/{{{category type|}}}]]
| aht urhgan whitegate = [[Category:Aht Urhgan Whitegate/{{{category type|}}}]][[Category:Aht Urhgan/{{{category type|}}}]]<!--
| #default = {{#ifexist:{{#sub:{{#explode:{{#explode:{{{location}}}|,|0}}|(|0}}|2|-2}}|[[Category:{{#sub:{{#explode:{{#explode:{{{location}}}|,|0}}|(|0}}|2|-2}}/{{{category type|}}}]]}}}}<!--
 
outlands (kazham, norg, rabao and some odd quests outside of towns  | yuhtunga jungle | cape teriggan | the sanctuary of zi'tah | the shrine of ru'avitau | eastern altepa desert  ) - see e.g. https://www.bg-wiki.com/ffxi/Category:Outlands_Quests
-->
| kazham | norg | rabao = [[Category:{{#sub:{{#explode:{{#explode:{{{location}}}|,|0}}|(|0}}|2|-2}}/{{{category type|}}}]][[Category:Outlands/{{{category type|}}}]]<!--
 
others (mhaura, selbina, tavnazia and some odd quests outside of towns) - yes it's an official category, see e.g. https://www.bg-wiki.com/ffxi/Category:Other_Quests
-->
| mhaura | selbina | tavnazian safehold = [[Category:{{#sub:{{#explode:{{#explode:{{{location}}}|,|0}}|(|0}}|2|-2}}/{{{category type|}}}]][[Category:Others/{{{category type|}}}]]<!--
 
rest - setting it to "Unallocated" so there is a category to catch all these which we can monitor and redistribute if necessary
-->
| #default = {{#ifexist:{{#sub:{{#explode:{{#explode:{{{location}}}|,|0}}|(|0}}|2|-2}}|[[Category:{{#sub:{{#explode:{{#explode:{{{location}}}|,|0}}|(|0}}|2|-2}}/{{{category type|}}}]][[Category:Unallocated/{{{category type|}}}]]}}}}<!--
-->}}</onlyinclude></includeonly>
-->}}</onlyinclude></includeonly>
==Usage==
==Usage==

Revision as of 13:22, 17 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:Selbina/Quests

{{Categorize Location
|location={{Location|Southern San d'Oria|H-7}}
|category type=Quests
}}

will categorize the page as Category:Southern San d'Oria/Quests and Category:San d'Oria/Quests

{{Categorize Location
|location={{Location|Southern San d'Oria|H-7}}
|category type=NPCs
}}

will categorize the page as Category:Southern San d'Oria/NPCs and Category:San d'Oria/NPCs