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

From blackwiki
Jump to navigation Jump to search
blackwiki>McVahl
blackwiki>McVahl
(+dab usage)
Line 12: Line 12:
 
For teams whose article is [[WP:DAB|disambiguated]]:
 
For teams whose article is [[WP:DAB|disambiguated]]:
 
<pre>
 
<pre>
["TEAM CODE"] = {"Team full name", "Team short name", a="Disambig article title"},</pre>
+
["TEAM CODE"] = {"Team full name", "Team short name", dab="Disambiguated title"},</pre>
  
 
For teams with multiple names:
 
For teams with multiple names:
Line 31: Line 31:
 
== Advanced structure ==
 
== Advanced structure ==
 
{{code|Team full name}} must match to the team's article title. For case of [[WP:DAB|disambiguation]], for example:
 
{{code|Team full name}} must match to the team's article title. For case of [[WP:DAB|disambiguation]], for example:
<pre>ALA = {"Alaska Aces", "Alaska", a = "Alaska Aces (PBA)"},"</pre>
+
<pre>ALA = {"Alaska Aces", "Alaska", dab = "PBA"},"</pre>
 
+
Sample demo: {{demo-inline|<nowiki>{{PBA team|ALA}}</nowiki>}}
Above will result to a red link, only if entry requires link to season article:
+
Instead of linking to ambiguous article [[Alaska Aces]], the {{code|dab}} parameter will appropriately link it to [[Alaska Aces (PBA)]].
* e.g. <code><nowiki>{{PBA team|ALA|season=2019}}</nowiki></code> → [[2019 Alaska Aces (PBA) season|Alaska Aces]], which links to [[2019 Alaska Aces (PBA) season]]
 
 
 
To resolve this issue, add {{code|s}} element to override the season team article title baseline:
 
<pre>ALA = {"Alaska Aces", "Alaska", a = "Alaska Aces (PBA)", s = "Alaska Aces" },</pre>
 
Then, {{demo-inline|<nowiki>{{PBA team|ALA|season=2019}}</nowiki>}}, now links to [[2019 Alaska Aces season]]
 
  
 
<includeonly>{{sandbox other | |
 
<includeonly>{{sandbox other | |

Revision as of 04:15, 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 names:

["TEAM CODE"] = {"Team full name", "Team short name",
  ["NAME1"] = "Name 1",
  ["NAME2"] = "Name 2",
  ["NAME3"] = "Name 3",
  ..
  ["NAMEn"] = "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).