Template:Decade years navbox/doc

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

This template can be used to create a year navigation box for year categories. Please consider before creating new year categories – there should exist a comprehensive topical categorization for the subject first.

Usage

{{Decade years navbox |header= |decade= |cat_prefix= |cat_suffix= }}

Template parameters

ParameterDescriptionDefaultStatus
headerThe text before the list of years, describing the subject (often wikilinked to a non-year-specific page).emptyrequired
decadeThe decade with 1–3 digits. E.g. 202 for the 2020s.emptyrequired
cat_prefixText in category name before the yearemptyoptional
cat_suffixText in category name after the yearemptyoptional
displayredlinksRed links are displayed by default. Set displayredlinks=no to hide them. Use displayredlinks=minmax if you want to set the first and/or last year to be displayed. Or displayredlinks=maybe to hide non-existent or empty categories.
Using displayredlinks=maybe should better not be used at all: it is costly, slow, unstable, causing existing categories to be hidden when they can have new members at any time (interacts badly with page caches, which can also be extremely long to reflect changes in counters of category members in order to refresh the page; additionally these counters are just estimations that may be corrected after many months, by admins performing special SQL requests to maintain the internal database). You should better usedisplayredlinks=no instead to avoid this problem.
yesoptional
minyearThe first year to be displayed with 4 digits. Requires displayredlinks=minmax to be set.emptyoptional
maxyearThe last year to be displayed with 4 digits. Requires displayredlinks=minmax to be set. If you want the current year to be the last year displayed, use maxyear={{CURRENTYEAR}}.emptyoptional
styleadditional CSSemptyoptional
paddingcharacter(s) used to wrap the year in the category links. It is a regular space ( ) by default. May be set to an empty string, if the affixes are to wrap the years closely in brackets or other punctuation, like a '/' for subpages (you can still append ' ' to cat_prefix or prepend ' ' to cat_suffix, if you need an explicit space in only one of them, because the named parameters for affixes have their unencoded whitespaces implicitly trimmed).' 'optional

Additional information

The template is intended to be used in the following namespaces: the Category namespace

The template is intended to be used by the following user groups: all users

See also