Difference between revisions of "Template:Decade link/doc"

From blackwiki
Jump to navigation Jump to search
imported>BrownHairedGirl
(Created page with '{{High use|12683}} A helper template which creates a link to the article on a given decade. This is needed because the articles on decades whose name ends in <c...')
 
imported>BrownHairedGirl
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{High use|12683}}
 
{{High use|12683}}
A helper template which creates a link to the article on a given decade.
+
A helper template which returns the name of the article on a given decade.
  
 
This is needed because the articles on decades whose name ends in <code>00s</code> are disambiguated.  So if a template needs to link to an article on decade, <code><nowiki>[[YYY0s]]</nowiki></code> will link to a disambiguation page for some decades.  
 
This is needed because the articles on decades whose name ends in <code>00s</code> are disambiguated.  So if a template needs to link to an article on decade, <code><nowiki>[[YYY0s]]</nowiki></code> will link to a disambiguation page for some decades.  
Line 21: Line 21:
  
 
== See also ==
 
== See also ==
* {{tl|DECADE}}
+
* [[:Template:DECADE]]
 +
* [[:Template:Year article]]
 +
* [[:Template:Year category name]]
  
 +
<includeonly>{{Sandbox other||
 
[[Category:Date-computing templates]]
 
[[Category:Date-computing templates]]
[[Category:Internal link templates]]
+
[[Category:Internal article-link templates]]
 +
}}</includeonly>

Latest revision as of 21:36, 13 May 2020

  1. Redirect Template:High-use

A helper template which returns the name of the article on a given decade.

This is needed because the articles on decades whose name ends in 00s are disambiguated. So if a template needs to link to an article on decade, [[YYY0s]] will link to a disambiguation page for some decades.

This template allows accurate links to be generated by writing [[{{Decade link|YYY0}}]]. The link is piped if needed.


Usage

{{Decade link|YYY0s}}

Examples

  1. [[{{Decade link|1720}}]]1720s
  2. [[{{Decade link|1850}}]]1850s
  3. [[{{Decade link|1600}}]]1600s
  4. [[{{Decade link|2000}}]]2000s

Note that the trailing letter "s" must be omitted:

  • [[{{Decade link|1690s}}]] → [[Expression error: Unrecognized word "s".1690ss]]
  • [[{{Decade link|1690}}]]1690s

See also