Template:DateSort/doc

From Tardis Wiki, the free Doctor Who reference
< Template:DateSort
Revision as of 17:20, 11 June 2013 by CzechOut (talk | contribs) (Created page with "{{tlx|DateSort}} — like its sister templates, {{tlx|NameSort}} and {{tlx|TitleSort}} — allows for ''apparently'' automatic sorting of pages. It uses the [[Help:magic word...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

{{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[[edit source]]

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.