Template talk:2012 NL Wild Card standings

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
WikiProject Baseball (Rated Template-class)
WikiProject iconThis template is within the scope of WikiProject Baseball, a collaborative effort to improve the coverage of baseball on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
 Template  This template does not require a rating on the project's quality scale.
 

Editors: Avoid a common mistake when updating this template[edit]

When editing this template in order to update it with a change in the team order, please note that the data for each team comprises TWO lines of code which must stay together in order for the highlighting parameter {{{team}}} to work correctly. Here is a correct example:

|- {{#switch:{{{team}}}|SF|SF=bgcolor="#CCFFCC"}}
| [[2012 San Francisco Giants season|San Francisco Giants]] || 39 || 32 || {{Winning percentage|39|32}} || - || 21-14 || 18-18
|- {{#switch:{{{team}}}|NYM|NYM=bgcolor="#CCFFCC"}}
| [[2012 New York Mets season|New York Mets]] || 38 || 32 || {{Winning percentage|38|32}} || ½  || 22-15 || 16-17

And here is an example where the template highlighting function is broken because the two lines were not kept together:

|- {{#switch:{{{team}}}|NYM|NYM=bgcolor="#CCFFCC"}}
| [[2012 San Francisco Giants season|San Francisco Giants]] || 39 || 32 || {{Winning percentage|39|32}} || - || 21-14 || 18-18
|- {{#switch:{{{team}}}|ATL|ATL=bgcolor="#CCFFCC"}}
| [[2012 New York Mets season|New York Mets]] || 38 || 32 || {{Winning percentage|38|32}} || ½  || 22-15 || 16-17

Note that in the above incorrect example, a user applying the template with the parameter NYM will result in the team line for the San Francisco Giants being highlighted. --Threephi (talk) 17:31, 24 June 2012 (UTC)