Difference between revisions of "Template:DEFAULTSORT/doc"

From blackwiki
Jump to navigation Jump to search
imported>DixonDBot
m (Migrating 7 interwiki links, now provided by Wikidata on d:Q6153098)
imported>Hyacinth
Line 9: Line 9:
  
 
==To understand DEFAULTSORT read the following==
 
==To understand DEFAULTSORT read the following==
*[[Help:Category#Default sort key]]
+
*[[Help:Category#Default sort key]]:
 +
::It is possible to set a default sort key which is different from <tt><nowiki>{{PAGENAME}}</nowiki></tt> by using the [[Help:magic words|magic word]]  <tt><nowiki>{{DEFAULTSORT}}</nowiki></tt> thus:
 +
::<tt><nowiki>{{DEFAULTSORT:new key}}</nowiki></tt>
 +
 
 +
::In the case of multiple default sort key tags, the last DEFAULTSORT on the final rendering of a page applies for all categories, regardless of the position of the category tags. This also means that a DEFAULTSORT tag included from a template is not effective if another DEFAULTSORT tag occurs later on the page, even if the later DEFAULTSORT tag is also "hidden" (included by another template).
  
 
<includeonly>
 
<includeonly>

Revision as of 23:16, 1 April 2013

{{DEFAULTSORT:<sort key>}} is a magic word used to apply a sort key to many categories at once. It can be overridden for individual categories applied to an article by manually applying a sort key.

It it not necessary to use DEFAULTSORT at all if the article or page should be alphabetized according to its title (true for most articles).

To understand DEFAULTSORT read the following

It is possible to set a default sort key which is different from {{PAGENAME}} by using the magic word {{DEFAULTSORT}} thus:
{{DEFAULTSORT:new key}}
In the case of multiple default sort key tags, the last DEFAULTSORT on the final rendering of a page applies for all categories, regardless of the position of the category tags. This also means that a DEFAULTSORT tag included from a template is not effective if another DEFAULTSORT tag occurs later on the page, even if the later DEFAULTSORT tag is also "hidden" (included by another template).