Difference between revisions of "YearNav"

From Sega Retro

m
m (Hivebrain moved page Template:YearCatNavNew to Template:YearNav without leaving a redirect)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<includeonly><div style="display:none;">
 
<includeonly><div style="display:none;">
{{#vardefine:year|{{year|{{PAGENAME}}}}}}{{#vardefine:prevyear|{{#expr:{{#var:year}}-1}}}}{{#vardefine:nextyear|{{#expr:{{#var:year}}+1}}}}{{#vardefine:text|{{#sub:{{PAGENAME}}|5}}}}
+
{{#vardefine:year|{{year|{{PAGENAME}}}}}}{{#vardefine:prevyear|{{#expr:{{#var:year}}-1}}}}{{#vardefine:nextyear|{{#expr:{{#var:year}}+1}}}}{{#vardefine:text|{{#sub:{{PAGENAME}}|5}}}}{{#if:{{{prev|}}}|{{#vardefine:prevyear|{{{prev}}}}}|}}{{#if:{{{next|}}}|{{#vardefine:nextyear|{{{next}}}}}|}}
 
</div>
 
</div>
 
{| class="bottomtemplate" align="left"
 
{| class="bottomtemplate" align="left"
 
|-
 
|-
|class="bottomtemptext" align="left" |{{#ifexist:Category:{{#var:prevyear}} {{#var:text}}|[[:Category:{{{#var:prevyear}}} {{{text}}}|← {{{#var:prevyear}}} {{{text}}}]] •<nowiki> </nowiki>|}}'''{{PAGENAME}}'''{{#ifexist:Category:{{#var:nextyear}} {{#var:text}}|<nowiki> </nowiki>• [[:Category:{{{#var:nextyear}}} {{{text}}}|{{#var:nextyear}} {{#var:text}} →]]|}}
+
|class="bottomtemptext" align="left" |{{#ifexist:Category:{{#var:prevyear}} {{#var:text}}|[[:Category:{{#var:prevyear}} {{#var:text}}|← {{#var:prevyear}} {{#var:text}}]] •<nowiki> </nowiki>|}}'''{{PAGENAME}}'''{{#ifexist:Category:{{#var:nextyear}} {{#var:text}}|<nowiki> </nowiki>• [[:Category:{{#var:nextyear}} {{#var:text}}|{{#var:nextyear}} {{#var:text}} →]]|}}
 
|}
 
|}
 
<br clear="all"></includeonly>
 
<br clear="all"></includeonly>

Latest revision as of 10:04, 22 May 2015