Template:Sortname/doc

From Tardis Wiki, the free Doctor Who reference
< Template:Sortname
Revision as of 19:29, 14 July 2021 by NateBumber (talk | contribs) (Created page with "'''{{tl|sortname}}''' is a shortcut that equates the following markup: <pre><span data-sort-value="variable2, variable1">variable1 variable2</span></pre> It's useful for...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

{{sortname}} is a shortcut that equates the following markup:

<span data-sort-value="variable2, variable1">[[variable1 variable2]]</span>

It's useful for sortable tables and based on a Wikipedia template.

Usage

{{sortname}} is useful for softable tables, so that authors can be sorted alphabetically by last name rather than first. Hence,

{{sortname|Steven|Moffat}} results in Steven Moffat.

If the author's page title includes a dab term, as in Dave Stone (writer), you can add it manually using dab. For instance,

{{sortname|Dave|Stone|dab=writer}} renders Dave Stone.

Alternately, you can override the link entirely:

{{sortname|Terence Joseph|Nation|Terry Nation}} yields Terence Joseph Nation.

Or you can their name to be sorted properly but without linking to their article:

{{sortname|Steven|Moffat|nolink=1}} results in Steven Moffat.