Difference between revisions of "Template:Decade link"
Jump to navigation
Jump to search
imported>MusikAnimal m (Protected "Template:Decade link": Highly visible template; 2,000+ transclusions ([Edit=Require autoconfirmed or confirmed access] (indefinite))) |
imported>Ymblanter m (Changed protection level for "Template:Decade link": Highly visible template: request at WP:RFPP ([Edit=Require template editor access] (indefinite))) |
||
| (3 intermediate revisions by one other user not shown) | |||
| Line 1: | Line 1: | ||
| − | {{#if:{{{2|}}} | + | <includeonly>{{#if:{{{2|}}} |
| − | |{{{2}}} {{#ifexpr:{{{1}}}mod 100 = 0 |{{{1}}}s (decade)|{{{1}}}s}}{{!}} | + | |{{{2}}} {{#ifexpr:{{{1}}} mod 100 = 0 |{{{1}}}s (decade)|{{{1}}}s}}{{!}} |
| − | |{{#ifexpr:{{{1|0}}}mod 100 = 0 |{{{1|0}}}s (decade){{!}}}} | + | |{{#ifexpr:{{{1|0}}} mod 100 = 0 |{{{1|0}}}s (decade){{!}}}} |
| − | }}{{{1}}}s<noinclude> | + | }}{{{1}}}s</includeonly><noinclude> |
| − | + | {{Documentation}} | |
| − | |||
| − | |||
| − | |||
</noinclude> | </noinclude> | ||
Latest revision as of 09:12, 22 February 2020
| This template is used on approximately 28,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them.
Transclusion count updated automatically (see documentation). |
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
[[{{Decade link|1720}}]]→ 1720s[[{{Decade link|1850}}]]→ 1850s[[{{Decade link|1600}}]]→ 1600s[[{{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
| The above documentation is transcluded from Template:Decade link/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |