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

Content deleted Content added
hide ombox if viewing in /doc subpage
 
(4 intermediate revisions by one other user not shown)
Line 1:
{{Module rating|beta}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{#ifeq:{{SUBPAGENAME}}|docsandbox other||{{ombox|text=To test changes, please do so at '''[[Module:{{PAGENAME}}/sandbox]]''' first, and then implement them here.}}}}
 
This is the data module used by [[Module:PHL sports team]].
Line 12:
For teams whose article is [[WP:DAB|disambiguated]]:
<pre>
["TEAM CODE"] = {"Team full name", "Team short name", adab="Disambig articleDisambiguated title"},</pre>
 
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):
For teams with multiple names:
<pre>
["TEAM CODE"] = {"Team full name", "Team short name",
["NAME1XXXXthruYYYY"] = "Name 1",
["NAME2XXXXthruYYYY"] = "Name 2",
["NAME3XXXXthruYYYY"] = "Name 3",
..
["NAMEnXXXXthruYYYY"] = "Name n",
},</pre>
 
Line 31:
== Advanced structure ==
{{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", adab = "Alaska Aces (PBA)"},"</pre>
Then,Sample demo: {{demo-inline|<nowiki>{{PBA team|ALA|season=2019}}</nowiki>}}, now links to [[2019 Alaska Aces season]]
Instead of linking to ambiguous article [[Alaska Aces]], the {{code|dab}} parameter will appropriately link it to [[Alaska Aces (PBA)]].
 
== Test table ==
Above will result to a red link, only if entry requires link to season article:
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
* 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]]
|{{#invoke:PHL sports team/testtable|main|league=PBA/sandbox|tname=PBA team}}
|{{#invoke:PHL sports team/testtable|main|league=PBA|tname=PBA team}}
}}
 
<includeonly>{{sandbox other | |
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>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Sports modules]]
 
}}</includeonly>