Actions

Template

Difference between revisions of "YearNav"

From NEC Retro

(Created page with "<includeonly>{{#vardefine:pagename|{{{1|{{PAGENAME}}}}}}}{{#vardefine:year|{{year|{{#var:pagename}}}}}}{{#vardefine:prevyear|{{#expr:{{#var:year}}-1}}}}{{#vardefine:nextyear|{...")
 
 
Line 1: Line 1:
<includeonly>{{#vardefine:pagename|{{{1|{{PAGENAME}}}}}}}{{#vardefine:year|{{year|{{#var:pagename}}}}}}{{#vardefine:prevyear|{{#expr:{{#var:year}}-1}}}}{{#vardefine:nextyear|{{#expr:{{#var:year}}+1}}}}{{#vardefine:text|{{#sub:{{#var:pagename}}|5}}}}{{#while:|{{#ifexist:Category:{{#var:prevyear}} {{#var:text}}||{{#ifexpr:{{#var:year}}-{{#var:prevyear}}<30|x}}}}|{{addvar|prevyear|-1}}}}{{#while:|{{#ifexist:Category:{{#var:nextyear}} {{#var:text}}||{{#ifexpr:{{#var:nextyear}}-{{#var:year}}<30|x}}}}|{{addvar|nextyear|1}}}}
+
<includeonly>{{#vardefine:pagename|{{{1|{{PAGENAME}}}}}}}{{#vardefine:year|{{year|{{#replace:{{#var:pagename}}|{{{prefix|}}}|}}}}}}{{#vardefine:prevyear|{{#expr:{{#var:year}}-1}}}}{{#vardefine:nextyear|{{#expr:{{#var:year}}+1}}}}{{#vardefine:text|{{#sub:{{#var:pagename}}|{{#expr:5 + {{#len:{{{prefix|}}}}}}}}}}}{{#while:|{{ifexists|Category:{{{prefix|}}} {{#var:prevyear}} {{#var:text}}||{{#ifexpr:{{#var:year}}-{{#var:prevyear}}<30|x}}}}|{{addvar|prevyear|-1}}}}{{#while:|{{ifexists|Category:{{{prefix|}}} {{#var:nextyear}} {{#var:text}}||{{#ifexpr:{{#var:nextyear}}-{{#var:year}}<30|x}}}}|{{addvar|nextyear|1}}}}
 
{| class="bottomtemplate" align="left"
 
{| class="bottomtemplate" align="left"
 
|-
 
|-
|class="bottomtemptext" align="left" |{{#ifexist:Category:{{#var:prevyear}} {{#var:text}}|[[:Category:{{#var:prevyear}} {{#var:text}}|← {{#var:prevyear}} {{#var:text}}]] •<nowiki> </nowiki>|}}'''{{#var:pagename}}'''{{#ifexist:Category:{{#var:nextyear}} {{#var:text}}|<nowiki> </nowiki>• [[:Category:{{#var:nextyear}} {{#var:text}}|{{#var:nextyear}} {{#var:text}} →]]|}}
+
|class="bottomtemptext" align="left" |{{ifexists|Category:{{{prefix|}}} {{#var:prevyear}} {{#var:text}}|[[:Category:{{{prefix|}}} {{#var:prevyear}} {{#var:text}}|← {{{prefix|}}} {{#var:prevyear}} {{#var:text}}]] •<nowiki> </nowiki>|}}'''{{#var:pagename}}'''{{ifexists|Category:{{{prefix|}}} {{#var:nextyear}} {{#var:text}}|<nowiki> </nowiki>• [[:Category:{{{prefix|}}} {{#var:nextyear}} {{#var:text}}|{{{prefix|}}} {{#var:nextyear}} {{#var:text}} →]]|}}
 
|}
 
|}
 
<br clear="all"></includeonly>
 
<br clear="all"></includeonly>
 
<noinclude>
 
<noinclude>
 
{{YearNav|1988 PC Engine games}}
 
{{YearNav|1988 PC Engine games}}
 +
 +
 +
{{YearNav|All 1992 games|prefix=All}}
 
[[Category:Navigational templates]]
 
[[Category:Navigational templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 12:43, 24 May 2023