Template:Football box collapsible: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
<includeonly><div class="vevent" {{#if:{{{id|}}}|id={{#ifeq:{{str_sub|{{{id}}}|0|1}}|"|{{{id|}}}|"{{{id}}}"}} }}><span class="summary" style="display: none;">{{{team1}}} v {{{team2}}}</span> | <includeonly><div class="vevent" {{#if:{{{id|}}}|id={{#ifeq:{{str_sub|{{{id}}}|0|1}}|"|{{{id|}}}|"{{{id}}}"}} }}><span class="summary" style="display:none;">{{{team1}}} v {{{team2}}}</span> | ||
{| cellspacing=0 class="{{{class|mw-collapsible mw-collapsed}}}" style="{{#if:{{{nobars|}}}||border-top:1px solid #999999; border-bottom:1px solid #999999; margin-bottom: -1px;}} width: {{{size|100%}}}; background-color:{{Football box collapsible/result/{{{competition|default}}}|result={{{result|}}}|bg={{{bg|}}}}}" | {| cellspacing="0" class="{{{class|mw-collapsible mw-collapsed}}}" style="{{#if:{{{nobars|}}}||border-top:1px solid #999999; border-bottom:1px solid #999999; margin-bottom:-1px;}} width:{{{size|100%}}}; background-color:{{Football box collapsible/result/{{{competition|default}}}|result={{{result|}}}|bg={{{bg|}}}}}" | ||
|- | |- | ||
| width={{#ifeq:{{{format}}}|1|28%|{{#ifeq:{{{format}}}|1.1|22%|{{#ifeq:{{{format}}}|1.2|28%|19%}}}}}} style="vertical-align:top" | <span style="white-space:nowrap;float:right;margin-left:.5em">{{{date}}}</span> {{#if:{{{round|}}}|<span style="font-size:85%;">{{{round}}}</span>|}} | | width={{#ifeq:{{{format}}}|1|28%|{{#ifeq:{{{format}}}|1.1|22%|{{#ifeq:{{{format}}}|1.2|28%|19%}}}}}} style="vertical-align:top" | <span style="white-space:nowrap;float:right;margin-left:.5em">{{{date}}}</span> {{#if:{{{round|}}}|<span style="font-size:85%;">{{{round}}}</span>|}} | ||
| Line 26: | Line 26: | ||
{{#ifexpr:{{#if:{{{note|}}}|1|0}} or {{#if:{{{seealso|}}}|1|0}} | | {{#ifexpr:{{#if:{{{note|}}}|1|0}} or {{#if:{{{seealso|}}}|1|0}} | | ||
{{!}}- | {{!}}- | ||
{{!}} colspan=7 style="text-align:left;font-size:85%" {{!}} | {{!}} colspan="7" style="text-align:left;font-size:85%" {{!}} | ||
{{#if:{{{note|}}}|''Note: {{{note}}}'' {{#if:{{{seealso|}}}|<br>|}}|}} | {{#if:{{{note|}}}|''Note: {{{note}}}'' {{#if:{{{seealso|}}}|<br>|}}|}} | ||
{{#if:{{{seealso|}}}|''See also: {{{seealso}}}''|}} | {{#if:{{{seealso|}}}|''See also: {{{seealso}}}''|}} | ||
|}} | |}} | ||
|}</div></includeonly><noinclude> | |}</div></includeonly><noinclude> | ||
== Usage == | |||
{{ | This template creates a collapsible football match box. The result can be shown by background color using the <code>result</code> parameter. | ||
For match events, <code>events1</code> and <code>events2</code> are preferred. The older <code>goals1</code> and <code>goals2</code> parameters remain supported for compatibility with existing pages. | |||
A raw URL entered in <code>report</code> is automatically displayed as '''Match report'''. A different label may be specified with <code>reportlabel</code>. | |||
=== Copy/paste === | |||
<pre> | |||
{{Football box collapsible | |||
| round = | |||
| date = | |||
| time = | |||
| team1 = | |||
| score = | |||
| team2 = | |||
| events1 = | |||
* | |||
| report = | |||
| events2 = | |||
* | |||
| stadium = | |||
| attendance = | |||
| referee = | |||
| assistantreferees = | |||
| motm = | |||
| result = | |||
| competition = default | |||
}} | |||
</pre> | |||
Unused parameters may be left blank or removed. | |||
For <code>result</code>, use: | |||
* <code>W</code> = win | |||
* <code>D</code> = draw | |||
* <code>L</code> = loss | |||
The result is from the perspective of the club whose season page is being displayed, not necessarily <code>team1</code>. | |||
=== Match events === | |||
Events should be listed chronologically under the appropriate team. | |||
Common event templates include: | |||
<pre> | |||
* Player Name {{goal|54}} | |||
* Player Name {{goal|54|pen.}} | |||
* Player Name {{yel|33}} | |||
* Player Name {{sent off|0|86}} | |||
</pre> | |||
Additional event templates or inline images may also be used in <code>events1</code> and <code>events2</code>. | |||
=== Example === | |||
<pre> | |||
{{Football box collapsible | |||
| round = Week 3 | |||
| date = 14 August 2022 | |||
| time = 18:00 | |||
| team1 = [[Nashville FC]] | |||
| score = 1–1 | |||
| team2 = [[Hourmen]] | |||
| events1 = | |||
* Matthew Dozier {{yel|33}} | |||
* Phil Roof {{goal|54|pen.}} | |||
| report = https://www.hattrick.org/Club/Matches/Match.aspx?matchID=700538146&SourceSystem=Hattrick | |||
| events2 = | |||
* Augusto Botero {{goal|39}} | |||
| stadium = Dudley Field | |||
| attendance = 7,308 | |||
| result = D | |||
| competition = default | |||
}} | |||
</pre> | |||
{{Football box collapsible | |||
| round = Week 3 | |||
| date = 14 August 2022 | |||
| time = 18:00 | |||
| team1 = [[Nashville FC]] | |||
| score = 1–1 | |||
| team2 = [[Hourmen]] | |||
| events1 = | |||
* Matthew Dozier {{yel|33}} | |||
* Phil Roof {{goal|54|pen.}} | |||
| report = https://www.hattrick.org/Club/Matches/Match.aspx?matchID=700538146&SourceSystem=Hattrick | |||
| events2 = | |||
* Augusto Botero {{goal|39}} | |||
| stadium = Dudley Field | |||
| attendance = 7,308 | |||
| result = D | |||
| competition = default | |||
}} | |||
</noinclude> | </noinclude> | ||
Revision as of 08:34, 18 August 2026
Usage
This template creates a collapsible football match box. The result can be shown by background color using the result parameter.
For match events, events1 and events2 are preferred. The older goals1 and goals2 parameters remain supported for compatibility with existing pages.
A raw URL entered in report is automatically displayed as Match report. A different label may be specified with reportlabel.
Copy/paste
{{Football box collapsible
| round =
| date =
| time =
| team1 =
| score =
| team2 =
| events1 =
*
| report =
| events2 =
*
| stadium =
| attendance =
| referee =
| assistantreferees =
| motm =
| result =
| competition = default
}}
Unused parameters may be left blank or removed.
For result, use:
W= winD= drawL= loss
The result is from the perspective of the club whose season page is being displayed, not necessarily team1.
Match events
Events should be listed chronologically under the appropriate team.
Common event templates include:
* Player Name {{goal|54}}
* Player Name {{goal|54|pen.}}
* Player Name {{yel|33}}
* Player Name {{sent off|0|86}}
Additional event templates or inline images may also be used in events1 and events2.
Example
{{Football box collapsible
| round = Week 3
| date = 14 August 2022
| time = 18:00
| team1 = [[Nashville FC]]
| score = 1–1
| team2 = [[Hourmen]]
| events1 =
* Matthew Dozier {{yel|33}}
* Phil Roof {{goal|54|pen.}}
| report = https://www.hattrick.org/Club/Matches/Match.aspx?matchID=700538146&SourceSystem=Hattrick
| events2 =
* Augusto Botero {{goal|39}}
| stadium = Dudley Field
| attendance = 7,308
| result = D
| competition = default
}}
| 14 August 2022 Week 3 | Nashville FC | 1–1 | Hourmen | Dudley Field |
|---|---|---|---|---|
| 18:00 |
|
https://www.hattrick.org/Club/Matches/Match.aspx?matchID=700538146&SourceSystem=Hattrick |
|
Attendance: 7,308 |