Difference between revisions of "Template:DSFL Year/Test"

From Sim Football Wiki
Jump to navigation Jump to search
m
Line 1: Line 1:
 
{{#switch: {{{2}}}
 
{{#switch: {{{2}}}
 
<!-- Different output based on second argument passed -->
 
<!-- Different output based on second argument passed -->
|year        = [[DSFL season {{{1}}}|{{#if:{{{3|}}}|{{{3}}}|{{#expr:2015+{{#if:{{{1|}}}|{{{1}}}|1}}}}}}{{#if:{{{s|}}} = yes| (S{{{1}}})}}]]                <!-- displays as the corresponding year -->
+
|year        = [[DSFL season {{{1}}}|{{#if:{{{linktext|}}}|{{{linktext}}}|{{#expr:2015+{{#if:{{{1|}}}|{{{1}}}|1}}}}}} {{#if:{{{s|}}} = yes|(S{{{1}}})}}]]                <!-- displays as the corresponding year -->
|full        = [[DSFL season {{{1}}}|{{#if:{{{3|}}}|{{{3}}}|{{#expr:2015+{{#if:{{{1|}}}|{{{1}}}|1}}}} DSFL season}}]]    <!-- displays as the corresponding year -->
+
|full        = [[DSFL season {{{1}}}|{{#if:{{{linktext|}}}|{{{linktext}}}|{{#expr:2015+{{#if:{{{1|}}}|{{{1}}}|1}}}} DSFL season}}]]    <!-- displays as the corresponding year -->
 
<!-- draft links -->
 
<!-- draft links -->
 
|draft-full  = [[Season {{{1}}} DSFL Draft|{{#if:{{{3|}}}|{{{3}}}|{{#expr:2015+{{#if:{{{1|}}}|{{{1}}}|1}}}} DSFL Draft}}]]    <!-- displays as "XXXX DSFL draft" -->
 
|draft-full  = [[Season {{{1}}} DSFL Draft|{{#if:{{{3|}}}|{{{3}}}|{{#expr:2015+{{#if:{{{1|}}}|{{{1}}}|1}}}} DSFL Draft}}]]    <!-- displays as "XXXX DSFL draft" -->
Line 42: Line 42:
 
|nolink      = {{#expr:2015+{{#if:{{{1|}}}|{{{1}}}|1}}}}
 
|nolink      = {{#expr:2015+{{#if:{{{1|}}}|{{{1}}}|1}}}}
 
<!-- default value goes to DSFL season page, link displays as year -->
 
<!-- default value goes to DSFL season page, link displays as year -->
|#default    = [[DSFL season {{{1}}}|{{#expr:2015+{{#if:{{{1|}}}|{{{1}}}|1}}}}]]
+
|#default    = [[DSFL season {{{1}}}|{{#expr:2015+{{#if:{{{1|}}}|{{{1}}}|1}}}} {{#if:{{{s|}}} = yes| (S{{{1}}})}}]]
 
}}<noinclude>
 
}}<noinclude>
 +
 +
This version allows you to add "s=yes" as a parameter to show the season number in brackets after the year.
 +
 
<nowiki>{{DSFL Year/Test|4|s=yes}}</nowiki> results in {{DSFL Year/Test|4|s=yes}}
 
<nowiki>{{DSFL Year/Test|4|s=yes}}</nowiki> results in {{DSFL Year/Test|4|s=yes}}
 +
 +
<nowiki>{{DSFL Year/Test|4|year|s=yes}}</nowiki> results in {{DSFL Year/Test|4|year|s=yes}}
 
[[Category:Date Shortcuts]]</noinclude>
 
[[Category:Date Shortcuts]]</noinclude>

Revision as of 13:30, 5 August 2022

[[DSFL season {{{1}}}|2016 (S{{{1}}})]]

This version allows you to add "s=yes" as a parameter to show the season number in brackets after the year.

{{DSFL Year/Test|4|s=yes}} results in 2019 (S4)

{{DSFL Year/Test|4|year|s=yes}} results in 2019 (S4)