Template talk:Height#rfc 97AACED
{{talkheader}}
{{WikiProject banner shell|
{{WikiProject Measurement}}
{{WikiProject Biography}}
{{WikiProject Sports}}
}}
{{Archives |auto=yes |search=yes |title=Archives ({{#titleparts:{{TALKPAGENAME}}) |bot=lowercase sigmabot III |age=90 }}
{{User:MiszaBot/config
|algo=old(90d)
|archive=Template talk:Height/Archive %(counter)d
|counter=3
|maxarchivesize=100K
|archiveheader={{Automatic archive navigator}}
|minthreadsleft=4
|minthreadstoarchive=1
}}
{{User:HBC Archive Indexerbot/OptIn
|target=Template talk:Height/Archive index
|mask=Template talk:Height/Archive <#>
|leading_zeros=0
|indexhere=yes
}}
Created for sports articles, to indicate how tall a player is.
__TOC__
Add "sort" ability to template
If this template is used in a table, then it does not sort properly. That is, it will sort values like this:
- 6 ft 0 in
- 6 ft 10 in
- 6 ft 2 in
Can we add the ability to sort on the metric unit of the value so that it is sorted properly? — X96lee15 (talk) 18:13, 22 December 2015 (UTC)
:The simplest might be to use {{tl|convert}} for more tricky cases because convert handles sortable tables and some other things that might be useful. See Help:Convert#Sortable table for a table example. Examples:
:*
→ {{convert|192|cm|ftin|abbr=on}}
:*
→ {{convert|192|cm|ftin|1|abbr=on}}
:*
→ {{convert|192|cm|ftin|abbr=on|frac=2}}
:*
→ {{convert|6|ft|3+1/2|in|cm|0|abbr=on}}
:*
→ {{convert|192|cm|ftin|abbr=on|frac=2|order=flip}}
:Using |sortable=on
adds a sort key, and the sort key can be displayed using debug=yes
:
:*
→ {{convert|192|cm|ftin|abbr=on|frac=2|sortable=on|debug=yes}}
Output in cm?
I've never lived anywhere where the height of people is measured in metres rather than centimetres (I'm Canadian and live in Japan). Why does this template force output in metres—especially given it accepts input in centimetres? Curly "JFC" Turkey 🍁 ¡gobble! 02:52, 20 February 2017 (UTC)
:I don't know, but the "See also" has some convert examples that output in cm so I guess it is hinting to use {{tl|convert}} for that (by the way, height calls convert to do the work now). In case you are not aware, some infoboxes no longer want a template—you just enter something like "5 ft 8 in
" and it magically works out what to do. Johnuniq (talk) 03:30, 20 February 2017 (UTC)
:: Thanks! That's a better solution. Curly "JFC" Turkey 🍁 ¡gobble! 03:44, 20 February 2017 (UTC)
:It's a very good question. One that keeps getting asked again, and again, and again...--45.72.141.216 (talk) 03:14, 4 May 2017 (UTC)
:: The template now allows {{para|out|cm}} to output conversions from feet and inches to centimetres. Example:
Talk:List of average human height worldwide
I'd asked this years ago on the Talk:List of average human height worldwide, but I tend to recall the template being able to do conversions down to the quarter-inch, and I'd really like that to happen again on the Talk:List of average human height worldwide. Is this possible? --Criticalthinker (talk) 11:36, 8 February 2018 (UTC)
:Talk:List of average human height worldwide#Conversion has an example in the reply:
:*
→ {{height|cm=177|frac=16}}
:It might be better to use {{tl|convert}} directly as that is understood by many editors and is used to do the work by {{tl|height}}. If wanted, {{tl|cvt}} (which is convert with abbr=on
) examples would be:
:*
→ {{cvt|177|cm|in|frac=4}}
:*
→ {{cvt|177|cm|ftin|frac=4}}
:Johnuniq (talk) 22:05, 8 February 2018 (UTC)
::I'd have no idea how to do this on that page. More than that, is this something I'd have to ask to do? I would like someone with the know-how to do this. --Criticalthinker (talk) 00:34, 9 February 2018 (UTC)
:::I don't understand that. If you are editing an article and want to use {{tl|height}} and want it to display a fraction, use |frac=4 (or |frac=2 or other number) as shown above. If you want to change the default behavior of this template, please spell out what you want. Johnuniq (talk) 03:09, 12 February 2018 (UTC)
Error handling
I noticed today that Height has not been displayed in the infobox for Geva Mentor for 5 months due to [https://en.wikipedia.org/w/index.php?title=Geva_Mentor&type=revision&diff=839956267&oldid=839955024 this] edit which introduced
. This is an obvious error in template usage, but the editor did not notice that nothing was displayed in the infobox and there was no warning. Not sure if there are many more of these out there. Can this generate an error or be flagged in a maint category or something? MB 14:12, 26 September 2018 (UTC)
: I added :Category:Pages using height with unknown parameters, which will take some time to fill up. we can remove this tracking if for some reason it's too much overhead. Frietjes (talk) 19:19, 26 September 2018 (UTC)