Template:Crsh/doc
< Template:Crsh
Jump to navigation
Jump to search
Revision as of 17:16, 24 April 2020 by Wikipedia>Vanisaac (→Examples: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other)
| This is a documentation subpage for Template:Crsh. It contains usage information, categories and other content that is not part of the original template page. |
This template is for sorting cricket results, with a hidden sortkey. (cricket result sort, hidden) The table header must have the data-sort-type="number" parameter set.
- Usage
{{crsh| {{{result}}} | {{{margin}}} | {{{number}}} }}
The first parameter is the result:
- W, for a win
- L, for a loss
- D, for a drawn match
- T, for a tied match
The second parameter is the type of win or loss:
- I, for an innings win or loss
- R, for a win or loss by runs
- W, for a win or loss by wickets
- Leave this blank for a tied or drawn match
The third parameter is number of runs or wickets:
- Enter as a number.
- Leave this blank for a tied or drawn match
This template works by placing a hidden sortkey before the visible text.
Examples
| markup | Display |
|---|---|
{{Crsh|W|I|300}} |
Won by an innings and 300 runs |
{{Crsh|W|R|60}} |
Won by 60 runs |
{{Crsh|W|W|10}} |
Won by 10 wickets |
{{Crsh|T}} |
Match tied |
{{Crsh|D}} |
Match drawn |
{{Crsh|L|I|7}} |
Lost by an innings and 7 runs |
{{Crsh|L|R|300}} |
Lost by 300 runs |
{{Crsh|L|W|1}} |
Lost by 1 wicket |