Module:Team appearances list/doc: Difference between revisions
This module implements {{tl|Team appearances list}}. Check there for documentation. |
basic info |
||
Line 1: | Line 1: | ||
{{Module rating |
{{Module rating|r}} |
||
⚫ | |||
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> |
|||
⚫ | |||
<!-- |
|||
⚫ | |||
== Modules == |
|||
<nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|''function_name''}} |
|||
{{#invoke:convert/tester|compare|team}} |
|||
--> |
|||
⚫ | |||
<!-- Categories below this line, please; interwikis at Wikidata --> |
|||
[[Module:Team appearances list]] is invoked by {{tl|Team appearances list}} to display a [[WP:HLIST|horizontal list]] showing the years a specified team participated in a specified competition. Each year of attendance is wikilinked to a corresponding article, while years the team did not compete (absences) are shown as disabled. |
|||
The names of the competition and team must be specified. Optionally, information for a competition can be defined in [[Module:Team appearances list/data]], and team information can be included: |
|||
*<code>begin_year</code> – The first year to be shown. |
|||
*<code>end_year</code> – The last year to be shown. |
|||
*Years the team did not attend the competition. |
|||
If <code>begin_year</code> or <code>end_year</code> are defined for a team, they set default values that can be overridden with parameters in the template. |
|||
If a team is defined for a particular competition, any absent years in the templace call are ignored (instead, the absences defined in the data module are used). |
|||
[[Module:Team appearances list/show]] is used for testing. It shows the results for all competition/team pairs defined in the data module. The results are displayed at [[Module talk:Team appearances list/show]]. |
|||
Changes should be performed in the sandbox modules, using the following for testing: |
|||
*{{tl|Team appearances list/sandbox}} – Uses the sandbox main and data modules. |
|||
*[[Module talk:Team appearances list/show]] – Results for all competition/team pairs defined in the sandbox data module. |
|||
⚫ | |||
Parameters provided by the template are validated using the following rules. |
|||
<pre> |
|||
Always: |
|||
competition required : non-empty string |
|||
team required : non-empty string |
|||
If competition is defined in data module: |
|||
begin_year optional : number from 1800 to 2100 inclusive |
|||
end_year optional : as above (and end_year >= begin_year) |
|||
else: |
|||
begin_year required : as above |
|||
end_year optional : as above |
|||
interval required : number from 1 to 30 inclusive |
|||
</pre> |
|||
An invalid parameter causes an error to be displayed and places the page in the hidden category [[:Category:Pages with script errors]]. |
|||
⚫ | |||
}}</includeonly> |
}}</includeonly> |
Revision as of 06:53, 26 November 2016
This module implements {{Team appearances list}}. Check there for usage documentation.
Modules
- Module:Team appearances list • Module:Team appearances list/sandbox • same content
- Module:Team appearances list/data • Module:Team appearances list/data/sandbox • different (diff)
- Module:Team appearances list/show • Module:Team appearances list/show/sandbox • same content
Module:Team appearances list is invoked by {{Team appearances list}} to display a horizontal list showing the years a specified team participated in a specified competition. Each year of attendance is wikilinked to a corresponding article, while years the team did not compete (absences) are shown as disabled.
The names of the competition and team must be specified. Optionally, information for a competition can be defined in Module:Team appearances list/data, and team information can be included:
begin_year
– The first year to be shown.end_year
– The last year to be shown.- Years the team did not attend the competition.
If begin_year
or end_year
are defined for a team, they set default values that can be overridden with parameters in the template.
If a team is defined for a particular competition, any absent years in the templace call are ignored (instead, the absences defined in the data module are used).
Module:Team appearances list/show is used for testing. It shows the results for all competition/team pairs defined in the data module. The results are displayed at Module talk:Team appearances list/show.
Changes should be performed in the sandbox modules, using the following for testing:
- {{Team appearances list/sandbox}} – Uses the sandbox main and data modules.
- Module talk:Team appearances list/show – Results for all competition/team pairs defined in the sandbox data module.
Errors
Parameters provided by the template are validated using the following rules.
Always: competition required : non-empty string team required : non-empty string If competition is defined in data module: begin_year optional : number from 1800 to 2100 inclusive end_year optional : as above (and end_year >= begin_year) else: begin_year required : as above end_year optional : as above interval required : number from 1 to 30 inclusive
An invalid parameter causes an error to be displayed and places the page in the hidden category Category:Pages with script errors.