Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Search
Search
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Template:Convert/doc
(section)
Template
Discussion
English
Read
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Using convert inside templates== For usage in template code, like infoboxes, {{tlf|Convert}} has these options: ;Pre-formatting fraction input * [[Module:Convert/helper]] can read regular input and pre-format it into {{tlf|Convert}}-accepted input. :Your template can accept {{para|input|16 7/8}} and use <nowiki>{{#invoke:Convert/helper|number|16 7/8}}</nowiki> → {{#invoke:Convert/helper|number|16 7/8}} ;Using a Wikidata property * Adding the Wikidata property code, like code {{para|input|P2073}}, to your template code automatically returns the Wikidata property for that article, and convert it. Both number and unit are read. Note: to return that property value for an ''other'' article, use {{para|qid}}. Example for {{Wikidata property link|P2073}} of {{Wikidata entity link|{{get QID|Cessna 208 Caravan}}}}: * <code><nowiki>{{convert|input=P2073|qid={{get QID|Cessna 208 Caravan}}|ftin|abbr=on}}</nowiki></code> → {{convert|input=P2073|qid={{get QID|Cessna 208 Caravan}}|ftin|abbr=on}} * <code><nowiki>{{convert|input=P2073|qid=Q1056131|km|abbr=on}}</nowiki></code> → {{convert|input=P2073|qid=Q1056131|km|abbr=on}} * <code><nowiki>{{convert|input=P2073|qid=Q1056131|km|abbr=on|disp=out}}</nowiki></code> → {{convert|input=P2073|qid=Q1056131|km|abbr=on|disp=out}} :For example see [[template:Infobox Telescope]]. Sometimes a property may have more than one value against it in Wikidata. You can use the {{para|qual}} parameter to specify which of the values you want to use. Example for {{Wikidata property link|P2386}}: Note: this example uses {{para|qid|Q1513315}} (testing for {{Wikidata entity link|Q1513315}}) * {{Wikidata entity link|Q613628}}: <code><nowiki>{{convert|input=P2386|qual=Q613628|ft|abbr=on}}</nowiki></code> β {{convert|input=P2386|qid=Q1513315|qual=Q613628|ft|abbr=on}} * {{Wikidata entity link|Q1395645}}: <code><nowiki>{{convert|input=P2386|qual=Q1395645|ft|abbr=on}}</nowiki></code> β {{convert|input=P2386|qid=Q1513315|qual=Q1395645|ft|abbr=on}}
Summary:
Please note that all contributions to Bourbon Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Bourbon Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Toggle limited content width