Template:Location/Reverse

From HorizonXI Wiki
< Template:Location
Revision as of 12:00, 19 September 2024 by Aramachus (talk | contribs) (Created page with "<onlyinclude><includeonly><!-- check if the location has coordinates by checking for brackets at the end -->{{#ifeq:{{#sub:{{{1|}}}|-1}}|)<!-- first split at a possible "," which designates a specific map, and take the 0 part then, if it has coordinates, split at the ( and take the 1 part, then remove the and brackets and return -->|{{#sub:{{#explode:{{#explode:{{{1}}}|,|0}}|(|0}}|2|-2}}<!-- again, split at a possible "," to account for a map being specified then,...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Usage

A template that is supposed to revert Template:Location and return the input area.

Examples

With coordinates:

{{Location/Reverse|{{Location|Port Windurst|J-8}}}}

Port Windurst

{{Location/Reverse|{{Location|Windurst Water|map=North|J-8}}}}

Windurst Waters


Without Coordinates

{{Location/Reverse|{{Location|Port Windurst}}}}

Port_Windurst

{{Location/Reverse|{{Location|San d'Oria}}}}

San_d'Oria


Not Working

Locations without coordinates with a map specification

{{Location/Reverse|{{Location|Windurst Waters|map=North}}}}