Template:Coords/doc: Difference between revisions

From Homecoming Wiki
Jump to navigation Jump to search
imported>Zombie Man (historical)
m (Moved within heirarchy of categories)
(expanding usage n parameter)
 
(7 intermediate revisions by 2 users not shown)
Line 3: Line 3:
==Usage==
==Usage==
This template uses {{tl|nobr}} to make sure that no line breaks occur in the middle of a [[coordinates]] string. It also puts the numbers in parentheses and separates them with commas.
This template uses {{tl|nobr}} to make sure that no line breaks occur in the middle of a [[coordinates]] string. It also puts the numbers in parentheses and separates them with commas.
If no numbers are provided, the numbers come from the "Has coordinates" property of the same page, or the page given as the "page" parameter. If multiple sets of coordinates exist, the "n" parameter (default 1) selects which set to display, with the first set numbered 1.
==Examples==
==Examples==
;<nowiki>{{coords|10.0|20.0|30.0}}</nowiki>
;<nowiki>{{coords|10.0|20.0|30.0}}</nowiki>
:{{coords|10.0|20.0|30.0}}
:{{coords|10.0|20.0|30.0}}
;<nowiki>{{coords|x=10.0|y=20.0|z=30.0}}</nowiki>
;<nowiki>{{coords|x=10.0|y=20.0|z=30.0}}</nowiki>
:{{coords|x=10.0|y=20.0|z=30.0}}
:{{coords|x=10.0|y=20.0|z=30.0}}
==See also==
;<nowiki>{{coords}}</nowiki>
:output based on "Has coordinates" properties defined on the page
;<nowiki>{{coords|page=Top Dog Badge}}</nowiki>
:{{coords|page=Top Dog Badge}}
;<nowiki>{{coords|page=Rail Rider Badge}}{{coords|page=Rail Rider Badge|n=2}}{{coords|page=Rail Rider Badge|n=3}}</nowiki>
:{{coords|page=Rail Rider Badge}}{{coords|page=Rail Rider Badge|n=2}}{{coords|page=Rail Rider Badge|n=3}}


<includeonly><!--
<includeonly><!--
++++ PLEASE ADD CATEGORIES AND INTERWIKIS BELOW THIS LINE, THANK YOU. -->
++++ PLEASE ADD CATEGORIES AND INTERWIKIS BELOW THIS LINE, THANK YOU. -->
[[Category:Contact Templates|{{PAGENAME}}]][[Category:Contact Mission|{{PAGENAME}}]]
[[Category:Badge Templates]]
[[Category:Contact Templates]]
[[Category:Mission Templates]]
[[Category:SMW Query Templates]]
</includeonly>
</includeonly>

Latest revision as of 05:54, 25 May 2022

This is a documentation subpage for Template:Coords (see that page for the template itself).
It contains usage information, categories and other content that is not part of the original template page.

Usage

This template uses {{nobr}} to make sure that no line breaks occur in the middle of a coordinates string. It also puts the numbers in parentheses and separates them with commas.

If no numbers are provided, the numbers come from the "Has coordinates" property of the same page, or the page given as the "page" parameter. If multiple sets of coordinates exist, the "n" parameter (default 1) selects which set to display, with the first set numbered 1.

Examples

{{coords|10.0|20.0|30.0}}
(10.0, 20.0, 30.0)[Copy]
{{coords|x=10.0|y=20.0|z=30.0}}
(10.0, 20.0, 30.0)[Copy]
{{coords}}
output based on "Has coordinates" properties defined on the page
{{coords|page=Top Dog Badge}}
(131.0, 319.7, -319.5)[Copy]
{{coords|page=Rail Rider Badge}}{{coords|page=Rail Rider Badge|n=2}}{{coords|page=Rail Rider Badge|n=3}}
(-4551.0, -187.6, 469.5)[Copy] (-2384.0, -238.6, 755.5)[Copy] (2226.0, -213.1, 1111.0)[Copy]