Template:Coords: Difference between revisions

From Unofficial Homecoming Wiki
Jump to navigation Jump to search
imported>Sekoia
(updating to use {{nobr}}. also trying to add support for x=|y=|z=; also updating documentation some)
imported>Konoko
(+doc)
Line 1: Line 1:
{{nobr|({{{x|{{{1}}}}}}, {{{y|{{{2}}}}}}, {{{z|{{{3}}}}}})}}<noinclude>
{{nobr|({{{x|{{{1}}}}}}, {{{y|{{{2}}}}}}, {{{z|{{{3}}}}}})}}<noinclude>
==Overview==
{{documentation}}</noinclude>
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.
 
==Examples==
;<nowiki>{{coords|10.0|20.0|30.0}}</nowiki>
:{{coords|10.0|20.0|30.0}}
 
;<nowiki>{{coords|x=10.0|y=20.0|z=30.0}}</nowiki>
:{{coords|x=10.0|y=20.0|z=30.0}}
 
[[Category:Standardized Text Templates]]</noinclude>

Revision as of 17:36, 11 December 2008

({{{1}}}, {{{2}}}, {{{3}}})

[edit] [purge] Documentation

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)
{{coords|x=10.0|y=20.0|z=30.0}}
(10.0, 20.0, 30.0)
{{coords}}
output based on "Has coordinates" properties defined on the page
{{coords|page=Top Dog Badge}}
({{{1}}}, {{{2}}}, {{{3}}})
{{coords|page=Rail Rider Badge}}{{coords|page=Rail Rider Badge|n=2}}{{coords|page=Rail Rider Badge|n=3}}
({{{1}}}, {{{2}}}, {{{3}}})({{{1}}}, {{{2}}}, {{{3}}})({{{1}}}, {{{2}}}, {{{3}}})