Template:Sort/doc

Boobpedia - Encyclopedia of big boobs
Revision as of 03:13, 2 April 2011 by The Honorable (talk | contribs) (Created page with "{{documentation subpage}} This template is for optionally sorting tables by specified sortkeys. If necessary, one can apply sorting using a sortkey that [[wikipedia:Help:Cascad...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
This is a documentation subpage for Template:Sort (see that page for the template itself).
It contains usage information, categories and other content that is not part of the original template page.

This template is for optionally sorting tables by specified sortkeys.

If necessary, one can apply sorting using a sortkey that due to CSS is not displayed: <span style="display:none">...</span>. Javascript sorting is based on the text inside and outside the tags, without the tags themselves. A hidden sortkey can be put at the start.

This template makes that more convenient. The first parameter is the sortkey; the second parameter is the wikitext of what has to be displayed. By default, this is the sortkey with link brackets.

To use it, place this in your table cell
|{{sort|Brothers Karamazov|[[The Brothers Karamazov]]}}

It presently works through hidden CSS, as described at Help:Sorting. If a cleaner way of doing this is developed, the template will be changed. A table using this template should use it in all rows.



The text in this article is based on the Wikipedia article "Sort/doc" used under the terms of the GNU Free Documentation License or the Creative Commons CC-BY-SA license. See Boobpedia's copyright notice.