Difference between revisions of "Template:DecadeCategoryNav"

From blackwiki
Jump to navigation Jump to search
imported>BrownHairedGirl
({{#ifexpr:{{{decade|}}}<2010)
imported>BrownHairedGirl
Line 1: Line 1:
 +
{{Tfm/dated|page=DecadeCategoryNav|otherpage=Navseasoncats|link=Wikipedia:Templates for discussion/Log/2019 August 23#Template:DecadeCategoryNav|help=off|bigbox={{#invoke:Noinclude|noinclude|text=yes}}}}
 
<includeonly>{{portal|{{#ifexist:Portal:{{{topic}}}|{{ucfirst:{{{topic}}}}}}} |History|{{#ifexpr:{{{decade|}}}>1910|{{#ifexpr:{{{decade|}}}<2010|{{#ifexist:Portal:{{{decade|}}}s|{{{decade|}}}s }}}}}}}}
 
<includeonly>{{portal|{{#ifexist:Portal:{{{topic}}}|{{ucfirst:{{{topic}}}}}}} |History|{{#ifexpr:{{{decade|}}}>1910|{{#ifexpr:{{{decade|}}}<2010|{{#ifexist:Portal:{{{decade|}}}s|{{{decade|}}}s }}}}}}}}
 
{| class="toc"  
 
{| class="toc"  

Revision as of 21:04, 23 August 2019

Template:Tfm/dated

Template documentation[view] [edit] [history] [purge]

Usage

{{DecadeCategoryNav|decade=|topic=}} Parameters:

  • decade - The first year of the decade to form the "center" of the navigation (e.g. 1980)
  • topic - (optional) The topic for the "DECADE in TOPIC" line (e.g. rail transport)

Example: {{DecadeCategoryNav|decade=1980|topic=rail transport}} results in: Template:Tfm/dated

Decades in rail transport: 1950s1960s • 1970s1980s1990s2000s2010s
Decades: 1950s1960s1970s1980s1990s2000s2010s

Error checking

This template should be capable of operating without parameters, by deriving them from the page title. Tracking categories have been set up to test whether there are any valid exceptions:

Valid use are tracked at:

Script error: No such module "Purge".

Valid exceptions include cases where the centre decade is intentionally different from the title decade, in order to link both backwards and forwards where there are currently long gaps between decade categories.