• Home
  • Random
  • Nearby
  • Log in
  • Settings
Donate Now If Wikipedia is useful to you, please give today.
  • About Wikipedia
  • Disclaimers
Wikipedia

Template:Baseball game links/sandbox

  • Template
  • Talk
  • Language
  • Watch
  • Edit
< Template:Baseball game links
This is the template sandbox page for Template:Baseball game links (diff).
See also the companion subpage for test cases.
Template documentation[view] [edit] [history] [purge]
This template uses Lua:
  • Module:Check for unknown parameters (sandbox)

This template is designed for articles who only document a single game. For multiple games, consider manually linking (for World Series, consider {{WSExtLinks}}. For team seasons, consider {{MLB team season stats}}.

Contents

  • 1 Usage
    • 1.1 Example
      • 1.1.1 All-Star Game Example
  • 2 Parameters
    • 2.1 TemplateData
  • 3 Maintenance/tracking categories

Usage

edit

To use this template, copy and paste this text to a baseball game's external links section:

{{Baseball game links |mlb= |espn= |br= |retro= |almanac= }}

Add the page ID's after the equals sign to properly direct the links that you desire to have. If you do not specify an ID, the site will not be shown.

Note: Unlike with other similar templates, this does not have a forced bullet, meaning you must add it yourself.

Example

edit

Example for 2015 National League Wild Card Game:

{{Baseball game links |mlb=446238 |br=PIT/PIT201510070 |retro=2015/B10070PIT2015}}

results in: Box score and game information from MLB, or Baseball Reference, or Retrosheet

To find a game's ID, find the game's page on a website and locate a string of numbers or letters in the URL similar to the ones above. That is the game's ID.

Note for Baseball-Reference, you must include the [Team]/ID, as in the example. For Retrosheet, you only need what's at the end (the year is optional).

All-Star Game Example

edit

For all-star games, do not enter in a value for Baseball Reference or Baseball Almanac. These sites use different URL formatting for the games. Instead, set the ASG param to that page's year:

{{Baseball game links |mlb=747298 |espn=401572073 |retro=B07160ALS2024 |asg=2024}}

results in: Box score and game information from MLB, or ESPN, or Baseball Reference, or Retrosheet, or Baseball Almanac

Parameters

edit
Parameter Website URL
|mlb= MLB.com https://www.mlb.com/gameday/{{{mlb}}}
|espn= ESPN.com https://www.espn.com/mlb/boxscore/_/gameId/{{{espn}}}
|br= Baseball-Reference.com https://www.baseball-reference.com/boxes/{{{br}}}.shtml
|retro= Retrosheet.org https://www.retrosheet.org/boxesetc/{{retro}}.htm
|almanac= Baseball-Almanac.com https://www.baseball-almanac.com/box-scores/boxscore.php?boxid={{almanac}}
|asg= Set to a year to automatically show Baseball Reference and Baseball Almanac.

TemplateData

edit
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Baseball game links in articles based on its TemplateData.

TemplateData for Baseball game links

Shows baseball box score and game information for various sites in one template.

Template parameters[Edit template data]

This template has custom formatting.

ParameterDescriptionTypeStatus
MLB IDmlb

The six-digit ID of this game on MLB's website. Found in a game URL, e.g. https://www.mlb.com/gameday/{id}

Example
748534
Numbersuggested
ESPN Stats IDespn

ID found at the end of the ESPN game URL. Note: There are no games prior to 2002. Follows the format: https://www.espn.com/mlb/boxscore/_/gameId/{espn}.

Example
270612106
Numbersuggested
Baseball Referencebr

The baseball reference code for this game. Do not use for all-star game pages (use All Star Game Year param). Found near the end of the URL: https://www.baseball-reference.com/boxes/{br}.shtml. Make sure to include the 3 letter team name!

Example
PIT/PIT201510070
Stringsuggested
Retrosheet IDretro

The Retrosheet.org page for this game. Found near the end of a Retrosheet game URL, e.g. https://www.retrosheet.org/boxesetc/{retro}.htm.

Example
B10070PIT2015
Stringsuggested
Baseball Almanacalmanac

The ID from baseball almanac. Do not use for all-star game pages (use All Star Game Year param). Found like this: https://www.baseball-almanac.com/box-scores/boxscore.php?boxid={{almanac}}

Example
198504140NYN
Stringsuggested
All Star Game Yearasg

If this is used on an all star game page, put the year of the all star game. Baseball-Reference and Baseball Almanac will be added automatically.

Example
2024
Numberoptional


Maintenance/tracking categories

edit
  • Category:Pages using Baseball game links with unknown parameters (0)
The above documentation is transcluded from Template:Baseball game links/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Baseball_game_links/sandbox&oldid=1281024687"
Last edited on 17 March 2025, at 21:01

Languages

      This page is not available in other languages.

      Wikipedia
      • Wikimedia Foundation
      • Powered by MediaWiki
      • This page was last edited on 17 March 2025, at 21:01 (UTC).
      • Content is available under CC BY-SA 4.0 unless otherwise noted.
      • Privacy policy
      • About Wikipedia
      • Disclaimers
      • Contact Wikipedia
      • Code of Conduct
      • Developers
      • Statistics
      • Cookie statement
      • Terms of Use
      • Desktop