Difference between revisions of "Module:PHL sports team/PBA/doc"

From blackwiki
Jump to navigation Jump to search
blackwiki>McVahl
(+dab usage)
blackwiki>McVahl
(→‎Data structure: update doc for multiple/historical names syntax)
Line 14: Line 14:
 
["TEAM CODE"] = {"Team full name", "Team short name", dab="Disambiguated title"},</pre>
 
["TEAM CODE"] = {"Team full name", "Team short name", dab="Disambiguated title"},</pre>
  
For teams with multiple names:
+
For teams with multiple or historical names (where {{code|XXXX}} represents the 4-digit start year and {{code|YYYY}} represents the 4-digit end year):
 
<pre>
 
<pre>
 
["TEAM CODE"] = {"Team full name", "Team short name",
 
["TEAM CODE"] = {"Team full name", "Team short name",
   ["NAME1"] = "Name 1",
+
   ["XXXXthruYYYY"] = "Name 1",
   ["NAME2"] = "Name 2",
+
   ["XXXXthruYYYY"] = "Name 2",
   ["NAME3"] = "Name 3",
+
   ["XXXXthruYYYY"] = "Name 3",
 
   ..
 
   ..
   ["NAMEn"] = "Name n",
+
   ["XXXXthruYYYY"] = "Name n",
 
},</pre>
 
},</pre>
  

Revision as of 05:23, 13 July 2020


This is the data module used by Module:PHL sports team.

Data structure

Most lines will be of the following form:

["TEAM CODE"] = {"Team full name", "Team short name"},

For teams whose article is disambiguated:

["TEAM CODE"] = {"Team full name", "Team short name", dab="Disambiguated title"},

For teams with multiple or historical names (where XXXX represents the 4-digit start year and YYYY represents the 4-digit end year):

["TEAM CODE"] = {"Team full name", "Team short name",
  ["XXXXthruYYYY"] = "Name 1",
  ["XXXXthruYYYY"] = "Name 2",
  ["XXXXthruYYYY"] = "Name 3",
  ..
  ["XXXXthruYYYY"] = "Name n",
},

Aliasing – a team having more than one code is also supported:

["ALIAS CODE"] = "TEAM CODE",

Trailing comma in each element is significant.

Advanced structure

Team full name must match to the team's article title. For case of disambiguation, for example:

ALA = {"Alaska Aces", "Alaska", dab = "PBA"},"

Sample demo: {{PBA team|ALA}}Template:PBA team Instead of linking to ambiguous article Alaska Aces, the dab parameter will appropriately link it to Alaska Aces (PBA).