Template:Coords: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary Tag: Reverted |
||
Line 1: | Line 1: | ||
{{nobr|({{{x|{{{1}}}}}}, {{{y|{{{2}}}}}}, {{{z|{{{3}}}}}})}} <copylink text="/thumbtack {{{x|{{{1}}}}}} {{{y|{{{2}}}}}} {{{z|{{{3}}}}}}">[Copy]</copylink> <noinclude> | {{nobr|({{{{{Replace|x|,|}}|{{{Replace|1}}}}}}, {{{Replace|y|,|}}|{{{Replace|2|,|}}}}}}}}, {{{Replace|z|,|}}|{{{Replace|3|,|}}}}}}}})}} <copylink text="/thumbtack {{{{{Replace|x|,|}}|{{{Replace|1}}}}}} {{{Replace|y|,|}}|{{{Replace|2|,|}}}}}}}} {{{Replace|z|,|}}|{{{Replace|3|,|}}}}}}}})}}">[Copy]</copylink> <noinclude> | ||
{{documentation}}</noinclude> | {{documentation}}</noinclude> |
Revision as of 09:26, 28 November 2021
(1, {{{#invoke:String|replace|source=y|,||count=|plain=1}}}}}, {{{#invoke:String|replace|source=z|,||count=|plain=1}}|3}}}}})}} [Copy]
[edit] [ ] 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}}
- (1, {{{#invoke:String|replace|source=y|,||count=|plain=1}}}}}, {{{#invoke:String|replace|source=z|,||count=|plain=1}}|3}}}}})}} [Copy]
- {{coords|x=10.0|y=20.0|z=30.0}}
- (1, {{{#invoke:String|replace|source=y|,||count=|plain=1}}}}}, {{{#invoke:String|replace|source=z|,||count=|plain=1}}|3}}}}})}} [Copy]
- {{coords}}
- output based on "Has coordinates" properties defined on the page
- {{coords|page=Top Dog Badge}}
- (1, {{{#invoke:String|replace|source=y|,||count=|plain=1}}}}}, {{{#invoke:String|replace|source=z|,||count=|plain=1}}|3}}}}})}} [Copy]
- {{coords|page=Rail Rider Badge}}{{coords|page=Rail Rider Badge|n=2}}{{coords|page=Rail Rider Badge|n=3}}
- (1, {{{#invoke:String|replace|source=y|,||count=|plain=1}}}}}, {{{#invoke:String|replace|source=z|,||count=|plain=1}}|3}}}}})}} [Copy] (1, {{{#invoke:String|replace|source=y|,||count=|plain=1}}}}}, {{{#invoke:String|replace|source=z|,||count=|plain=1}}|3}}}}})}} [Copy] (1, {{{#invoke:String|replace|source=y|,||count=|plain=1}}}}}, {{{#invoke:String|replace|source=z|,||count=|plain=1}}|3}}}}})}} [Copy]