Template:Year in country category/core and Template:Year in country category/core/sandbox: Difference between pages
Appearance
(Difference between pages)
Content deleted Content added
BrownHairedGirl moved page Template:Year in country category/core to Template:Year in country category/inner core: core being split to inner outer Tag: New redirect |
→top: bypass redirect |
||
Line 1: | Line 1: | ||
<!-- |
|||
#REDIRECT [[Template:Year in country category/inner core]] |
|||
;Diagnostics |
|||
* year = {{{year}}} |
|||
* country = {{{country}}} |
|||
* continent = {{{continent}}} |
|||
* prefix = {{{prefix}}} |
|||
* othercontinent= {{{othercontinent}}} |
|||
--><includeonly><!-- |
|||
# Portals |
|||
-->{{YearInCountryPortalBox|{{{country}}}|{{{prefix}}} {{{country}}}|year={{{year}}}}}<!-- |
|||
######## Begin header text |
|||
# link to country needs some trickery |
|||
-->Topics specifically related to the year '''[[{{{year}}}]]''' in <!-- |
|||
-->{{#ifeq:{{{prefix}}}|<!-- |
|||
-->|<!-- # no prefix, so this is simple |
|||
-->'''[[{{{country}}}]]'''<!-- |
|||
-->|<!-- # we have a prefix, so need to strip any leading "the" |
|||
-->{{#ifeq: {{#invoke:String|match|s={{{prefix}}}|pattern=^the ?|start=1|match=1|plain=false|nomatch=%%nomatch%%}}|%%nomatch%%<!-- |
|||
-->|<!-- prefix does not begin with "the" |
|||
-->'''[[{{{prefix}}} {{{country}}}]]'''<!-- |
|||
-->|<!-- prefix begins with "the" |
|||
-->the '''[[{{#invoke:String|replace|source={{{prefix}}}|pattern=^the ?(.*)$|replace=%1|count=1|plain=false}} {{{country}}}]]'''<!-- |
|||
-->}}<!-- |
|||
-->}}<!-- |
|||
# link to main article, but only if it exists |
|||
-->{{#ifexist:{{{year}}} in {{{prefix}}} {{{country}}}|<br>Main article: '''[[{{{year}}} in {{{prefix}}} {{{country}}}]]'''}} |
|||
<!-- |
|||
######## End header text |
|||
-->{{Category series navigation with decades below year||{{{year}}}| in {{{prefix}}} {{{country}}}|min={{{min|}}}}} |
|||
{{#switch: {{lc:{{{nocat|}}}}} |
|||
| y | yes = <!-- nocat=Yes, so no categories --> |
|||
| #default = <!-- do categories --> |
|||
{{#ifexist: Category:{{{year}}} by country|[[Category:{{{year}}} by country{{!}}{{{country}}}]]}}<!-- |
|||
## Use "Category:nth century in CountryName" unless the ## |
|||
{{Redirect category shell| |
|||
## parameter "nocountrycentury" is explicitly set to yes ## |
|||
{{R from move}} |
|||
-->{{#ifeq: {{yesno-no|{{{nocountrycentury|}}}}} | no<!-- |
|||
-->|<!-- |
|||
# Default: use "Category:nth century in CountryName" |
|||
-->[[Category:Years of the {{Century name from decade or year|{{{year}}}}} in {{#if: {{{newname}}} |{{{newname}}} | {{{prefix}}} {{{country}}}}}{{!}}{{{year}}}]]<!-- |
|||
-->|<!-- |
|||
# parameter "nocountrycentury=yes", so .... |
|||
# use "Category:Years in CountryName" |
|||
-->[[Category:Years in {{#if: {{{newname}}}|{{{newname}}} | {{{prefix}}} {{{country}}}}}{{!}}{{{year}}}]]<!-- |
|||
# And track this usage |
|||
-->[[Category:Template Year in country category with nocountrycentury]]<!-- |
|||
-->}} |
|||
[[Category:{{DECADE|{{{year}}}}} in {{{prefix}}} {{{country}}}]] |
|||
[[Category:{{{year}}} in {{{continent}}}|{{{country}}}]] |
|||
{{#if:{{{othercontinent}}}| |
|||
{{#switch: {{{othercontinent|}}} |
|||
|United Kingdom |
|||
|Soviet Union=[[Category:{{{year}}} in the {{{othercontinent}}}{{!}}{{{country}}}]] |
|||
|#default =[[Category:{{{year}}} in {{{othercontinent}}}{{!}}{{{country}}}]] |
|||
}} |
|||
}} |
}} |
||
{{#if: {{{newname|}}} | [[Category:Year in country category with newname parameter]]}} |
|||
}} |
|||
__NOGALLERY__ |
|||
</includeonly><noinclude> |
|||
{{Documentation|Template:{{ROOTPAGENAME}}/doc}} |
|||
</noinclude> |