Template:DateSort: Difference between revisions
From Tardis Wiki, the free Doctor Who reference
No edit summary |
m (Robot: Automated text replacement (-( *?)\( + ()) |
||
(17 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{DEFAULTSORT: {{#switch:{{PAGENAME}} | |||
| 1 January | 1 January (production) | 1 January (releases) | 1 January (people) = 001 | |||
| 2 January | 2 January (production) | 2 January (releases) | 2 January (people) = 002 | |||
| 3 January | 3 January (production) | 3 January (releases) | 3 January (people) = 003 | |||
| 4 January | 4 January (production) | 4 January (releases) | 4 January (people) = 004 | |||
| 5 January | 5 January (production) | 5 January (releases) | 5 January (people) = 005 | |||
| 6 January | 6 January (production) | 6 January (releases) | 6 January (people) = 006 | |||
| 7 January | 7 January (production) | 7 January (releases) | 7 January (people) = 007 | |||
| 8 January | 8 January (production) | 8 January (releases) | 8 January (people) = 008 | |||
| 9 January | 9 January (production) | 9 January (releases) | 9 January (people) = 009 | |||
| 10 January | 10 January (production) | 10 January (releases) | 10 January (people) = 010 | |||
| 11 January | 11 January (production) | 11 January (releases) | 11 January (people) = 011 | |||
| 12 January | 12 January (production) | 12 January (releases) | 12 January (people) = 012 | |||
| 13 January | | |||
Latest revision as of 04:47, 12 June 2013
Instructions for {{DateSort}}
{{DateSort}} — like its sister templates, {{NameSort}} and {{TitleSort}} — allows for apparently automatic sorting of pages. It uses the magic word, DEFAULTSORT, along with a #switch, to convert a day of the year to a number from 1 to 365 (29 February sharing the same number as 28 February), thus allowing day of the year pages to sort numerically.
Usage
Usage is super easy. Just type {{DateSort}} at the bottom of a page. Then, when you add categories to the page you no longer have to define the sort key for every individual category. It will automatically sort the person by their numerical ID.