Template:MLB standings/doc
![]() | This is a documentation subpage for Template:MLB standings. It may contain usage information, categories and other content that is not part of the original template page. |
![]() | This template is used on approximately 3,800 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
![]() | This template uses Lua: |
Usage
[edit]For a division standings template:
{{MLB standings
|division=<division name>
|year=<year>
|seeds={{{seeds|}}}
|highlight={{{highlight|}}}
|<1st place team>
|<home wins>|<home losses>
|<road wins>|<road losses>
|<2nd place team>
|<home wins>|<home losses>
|<road wins>|<road losses>
|<3rd place team>
|<home wins>|<home losses>
|<road wins>|<road losses>
|<4th place team>
|<home wins>|<home losses>
|<road wins>|<road losses>
|<5th place team>
|<home wins>|<home losses>
|<road wins>|<road losses>
}}
For the division leaders table in a wild card standings template:
{{MLB standings
|input=overallWinLoss
|division=Division leaders
|year=<year>
|template_name=<name of template page without "Template:" prefix>
|highlight={{{highlight|}}}
|<1st division leader>
|<overall wins>|<overall losses>
|<2nd division leader>
|<overall wins>|<overall losses>
|<3rd division leader>
|<overall wins>|<overall losses>
}}
For the wild card standings in a wild card standings template:
{{MLB standings
|input=overallWinLoss
|output=wildCard
|year=<year>
|template_name=<name of template page without "Template:" prefix>
|highlight={{{highlight|}}}
|<1st team>
|<overall wins>|<overall losses>
|<2nd team>
|<overall wins>|<overall losses>
|<3rd team>
|<overall wins>|<overall losses>
...
}}
For the wild card standings in a wild card standings template from 2012 to 2021, the following alternate syntax is supported:
{{MLB standings
|input=overallWinLoss
|output=wildCard2012
|year=<year>
|template_name=<name of template page without "Template:" prefix>
|highlight={{{highlight|}}}
|<1st team>
|<overall wins>|<overall losses>
|<2nd team>
|<overall wins>|<overall losses>
|<3rd team>
|<overall wins>|<overall losses>
...
}}
This template is a helper template for annual MLB division standings templates, such as Template:2013 NL East standings. It is also used to create the standings tables contained in a wild card standings template, such as Template:2013 AL Wild Card standings.
Creating an MLB division standings template
[edit]To create a division standings template for a given MLB division and year:
- Create the template with the name Template:<year> <AL or NL> <East, Central, or West> standings. For example: Template:2013 AL Central standings
- Use the
{{MLB standings}}
template as shown in the usage example above. The teams must be listed in the correct standings order. For the|division=
parameter, use one of the following values:- National League East
- National League Central
- National League West
- American League East
- American League Central
- American League West
- Note the
|seeds=
and|highlight=
parameters must be included as shown, in order to allow these parameters to be passed through from the division standings template. - If you are creating a standings template for a division not listed above, and you want the heading in the standings table to link to a specific article, add a
|division_link=
parameter, set to the name of the target article. - For cases where the name of the team season article page is not in the format "<year> <team name> <season>", see § Support for customizing links.
The resulting division standings template can be used as follows:
- In the season article for a team: use the
|highlight=
parameter, set to the name of the team. For example, in the 2013 Toronto Blue Jays season article, use the following:{{2013 AL East standings|highlight=Toronto Blue Jays}}
- In the MLB season article:
- During the regular season, when no teams have clinched a playoff position: use the division standings template without any parameters. For example, in the 2013 Major League Baseball season article, use the following:
{{2013 NL Central standings}}
- When a team has clinched a playoff spot but the seeding for the playoffs is unknown, use the
|highlight=
parameter to specify the team in the playoffs. Multiple teams can be listed by using a comma to separate them. For example, to indicate that the Seattle Mariners and Oakland A's are going to be in the 2013 playoffs, use the following:{{2013 AL West standings|highlight=Seattle Mariners,Oakland A's}}
- When the seeding of a team bound for the playoffs is known, use the
|seeds=
parameter to specify the team's seeding, in the format "<seed number>:<team name>". Multiple seeds can be listed by using a comma to separate them. For example, to indicate that the Chicago White Sox are seeded first and the Kansas City Royals are seeded fourth in the 2013 playoffs, use the following:{{2013 AL Central standings|seeds=1:Chicago White Sox,4:Kansas City Royals}}
- Both the
|seeds=
and|highlight=
parameters can be combined together as needed. For example, to indicate that the Washington Nationals are seeded first and the Atlanta Braves have clinched the playoffs with a yet-to-be-determined seeding, use the following:{{2013 NL East standings|seeds=1:Washington Nationals|highlight=Atlanta Braves}}
- During the regular season, when no teams have clinched a playoff position: use the division standings template without any parameters. For example, in the 2013 Major League Baseball season article, use the following:
Creating a wild card standings template
[edit]A wild card standings template, such as Template:2013 AL Wild Card standings, consists of a division leaders table and a wild card standings table. To create the division leaders table, use the {{MLB standings}}
template as shown in the usage example above. The teams must be listed in the desired output order. For the |division=
parameter, use |division=Division leaders
. Set the |input=
parameter to |input=overallWinLoss
. The |template_name=
parameter must specify the name of the template page, such as |template_name=2013 AL Wild Card standings
, without the "Template:" prefix. Note the |highlight=
parameter must be included as shown, in order to allow this parameter to be passed through from the wild card standings template.
To create the wild card standings table, use the {{MLB standings}}
template as shown in the usage example above. The teams must be listed in the correct standings order. Set the |input=
parameter to |input=overallWinLoss
, and the |output=
parameter to |output=wildCard
. Note the |highlight=
parameter must be included as shown, in order to allow this parameter to be passed through from the wild card standings template. (For backwards compatibility, the |output=
parameter can be set to |output=wildCard2012
for seasons from 2012 to 2021.)
The resulting wildcard standings template can be included in a team season article, such as 2013 Chicago Cubs season, with the |highlight=
parameter set to the team name. For example: {{2013 NL Wild Card standings|highlight=Chicago Cubs}}
Support for customizing links
[edit]The following parameters are supported to facilitate using this template for standings templates related to organizations other than MLB, and for cases where the default links are insufficient:
- If you want the heading in the standings table to link to a specific article, add a
|division_link=
parameter, set to the name of the target article. - For a given team, if the team season article does not following the format "<year> <team name> <season>" (for instance, if the team name has a disambiguator at the end), specify the required text between "<year>" and "<season>" by adding a
|team_links=
parameter, with the following format:team_links=<team 1 name>:<team 1 article name>,<team 2 name>:<team 2 article name>
For example:|team_links=New York Giants:New York Giants (PL),Philadelphia Athletics:Philadelphia Athletics (PL)
Examples
[edit]Using the {{MLB standings}}
template to create a division standings table:
{{MLB standings
|division=National League Central
|year=2016
|seeds={{{seeds|}}}
|highlight={{{highlight|}}}
|Chicago Cubs
|57|24
|46|34
|St. Louis Cardinals
|38|43
|48|33
|Pittsburgh Pirates
|38|42
|40|41
|Milwaukee Brewers
|41|40
|32|49
|Cincinnati Reds
|38|43
|30|51
}}
Resulting output:
Team | W | L | Pct. | GB | Home | Road |
---|---|---|---|---|---|---|
Chicago Cubs | 103 | 58 | .640 | — | 57–24 | 46–34 |
St. Louis Cardinals | 86 | 76 | .531 | 17½ | 38–43 | 48–33 |
Pittsburgh Pirates | 78 | 83 | .484 | 25 | 38–42 | 40–41 |
Milwaukee Brewers | 73 | 89 | .451 | 30½ | 41–40 | 32–49 |
Cincinnati Reds | 68 | 94 | .420 | 35½ | 38–43 | 30–51 |
Using the {{MLB standings}}
template to create a division leaders table:
{{MLB standings
|input=overallWinLoss
|division=Division leaders
|year=2016
|template_name=2016 NL Wild Card standings
|highlight={{{highlight|}}}
|Chicago Cubs
|103|58
|Washington Nationals
|95|67
|Los Angeles Dodgers
|91|71
}}
Resulting output:
Team | W | L | Pct. |
---|---|---|---|
Chicago Cubs | 103 | 58 | .640 |
Washington Nationals | 95 | 67 | .586 |
Los Angeles Dodgers | 91 | 71 | .562 |
Using the {{MLB standings}}
template to create a wild card standings table:
{{MLB standings
|input=overallWinLoss
|output=wildCard
|year=2022
|template_name=2022 NL Wild Card standings
|highlight={{{highlight|}}}
|New York Mets
|87|75
|San Francisco Giants
|87|75
|St. Louis Cardinals
|86|76
|Miami Marlins
|79|82
|Pittsburgh Pirates
|78|83
|Colorado Rockies
|75|87
|Milwaukee Brewers
|73|89
|Philadelphia Phillies
|71|91
|Arizona Diamondbacks
|69|93
|Atlanta Braves
|68|93
|San Diego Padres
|68|94
|Cincinnati Reds
|68|94
}}
Resulting output:
Team | W | L | Pct. | GB |
---|---|---|---|---|
New York Mets | 87 | 75 | .537 | +1 |
San Francisco Giants | 87 | 75 | .537 | +1 |
St. Louis Cardinals | 86 | 76 | .531 | — |
Miami Marlins | 79 | 82 | .491 | 6½ |
Pittsburgh Pirates | 78 | 83 | .484 | 7½ |
Colorado Rockies | 75 | 87 | .463 | 11 |
Milwaukee Brewers | 73 | 89 | .451 | 13 |
Philadelphia Phillies | 71 | 91 | .438 | 15 |
Arizona Diamondbacks | 69 | 93 | .426 | 17 |
Atlanta Braves | 68 | 93 | .422 | 17½ |
San Diego Padres | 68 | 94 | .420 | 18 |
Cincinnati Reds | 68 | 94 | .420 | 18 |
See also
[edit]- Module:MLB standings – used to implement this template