Template:Ntsh/doc: Difference between revisions
Appearance
| [checked revision] | [checked revision] |
Content deleted Content added
Caleb Cooper (talk | contribs) |
Caleb Cooper (talk | contribs) No edit summary |
||
| Line 10: | Line 10: | ||
{{Format TemplateData|TOC=1|JSON={ |
{{Format TemplateData|TOC=1|JSON={ |
||
"description": "'''Ntsh''' ('''<u>N</u>'''umber '''<u>T</u>'''able '''<u>S</u>'''orting, '''<u>H</u>'''idden) generates a hidden sort key that allows numbers to sort correctly when a column of a sortable table needs to be sorted alphabetically. This template is a hidden version of {{tl|Number table sorting}}. See [[Help:Sorting#Sorting with a hidden key]]. It can be used to prefix non-numeric entries; for example, using <code>{{ntsh|0}}None</code> will cause \"None\" to be sorted as if it had a numeric value of zero.<p>This template has the same limitation as {{tl|Number table sorting}}. Please read [[Template:Number table sorting#Limitations]].</p>", "params": { |
"description": "'''Ntsh''' ('''<u>N</u>'''umber '''<u>T</u>'''able '''<u>S</u>'''orting, '''<u>H</u>'''idden) generates a hidden sort key that allows numbers to sort correctly when a column of a sortable table needs to be sorted alphabetically. This template is a hidden version of {{tl|Number table sorting}}. See [[Wikipedia:Help:Sorting#Sorting with a hidden key]]. It can be used to prefix non-numeric entries; for example, using <code>{{ntsh|0}}None</code> will cause \"None\" to be sorted as if it had a numeric value of zero.<p>This template has the same limitation as {{tl|Number table sorting}}. Please read [[Template:Number table sorting#Limitations]].</p>", "params": { |
||
"1": { |
"1": { |
||
"label": "Sort value", |
"label": "Sort value", |
||
Latest revision as of 18:19, 22 October 2020
| This template uses Lua: |
| Template:ntsh is deprecated. Please use Template:number table sorting instead. |
| The {{number table sorting}} template now also creates sort keys that are hidden, so please use that template instead. This template should be used for numbers only! |
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. Click here to see a monthly parameter usage report for this template based on this TemplateData.
TemplateData for Ntsh/doc
Ntsh (Number Table Sorting, Hidden) generates a hidden sort key that allows numbers to sort correctly when a column of a sortable table needs to be sorted alphabetically. This template is a hidden version of {{Number table sorting}}. See Wikipedia:Help:Sorting. It can be used to prefix non-numeric entries; for example, using
{{ntsh|0}}None will cause "None" to be sorted as if it had a numeric value of zero.This template has the same limitation as {{Number table sorting}}. Please read Template:Number table sorting.
Template parameters
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Sort value | 1 | The value which this table row will sort as, when sorted against the output of other cells using ntsh or number table sorting. | Number | required |
| Debug mode | debug | If set to yes, causes the search key to be displayed in a box followed by the number. Do not use in article space. | Unknown | optional |
Usage
{{ntsh|some number}}
This template is not intended for use with non numeric input. Doing so will result in an error message.
Output
No output is displayed when using almost all browsers. If a text browser is used the result is undefined. See Wikipedia:Accessibility.
{{ntsh|123456789.00123}}generates<span data-sort-value="7008123456789001230♠" style="display:none"></span>{{ntsh|-123456789.00123}}generates<span data-sort-value="2991876543210998770♠" style="display:none"></span>
See also
For documentation see wikipedia page wikipedia:Template:Ntsh