Editing
Module:Adjacent stations/doc
(section)
From Thetacola Wiki
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Basic structure == Two modules are demonstrated below: {| class="wikitable" |- | [[Module:Adjacent stations/blank|Blank]] || {{syntaxhighlight|lang=lua|{{Module:Adjacent stations/blank}}}} |- | [[Module:Adjacent stations/Kaohsiung Rapid Transit|Example]] || {{syntaxhighlight|lang=lua|{{Module:Adjacent stations/Kaohsiung Rapid Transit}}}} |} The example module is [[Module:Adjacent stations/Kaohsiung Rapid Transit]]. * The two required table entries are "station format" and "lines". The former is a table with data to form links to station articles, and the latter is a table containing a table for each line. * "system title" is the text in the middle cell of the table header row. * "station format" defines the default name format for station articles and exceptions. The first variable ("%1 metro station") is the default. Exceptions are listed as key–value pairs (e.g. "Zuoying"–"Zuoying HSR station"), where the key is the input name. The module displays the input name and links to the article with the formatted name, replacing "%1" with the input. Alternatively, the full wikilink and be entered. This can be used to have the display be different from the input. * "lines" is where the lines are listed. The names here are used internally and not displayed, so choose a concise one. * "line title" is the text displayed in the middle of each row indicating the line; "left terminus" is the default station name for the left side terminus, and "right terminus" is the default station name for the right side terminus. * Each "color" entry is the colour of the line. Below is [[Module:Adjacent stations/Taiwan High Speed Rail]]: {{syntaxhighlight|lang=lua|{{Module:Adjacent stations/Taiwan High Speed Rail}}}} * <var>x</var> (defined in the first line) is a string used for formatting the station name. The variable <var>x</var> is used inside the "station format" table for the three articles where the title ends in "station" instead of "HSR station". This practice is optional but helpful when many articles fit a second pattern. * The module recognises a virtual line named <code>["_default"]</code>. The title and colour of this line is used for all lines unless overridden. Parameters are used in the absence of a specified <code>line=</code> in transclusion.
Summary:
Please note that all contributions to Thetacola Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Project:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Page actions
Module
Discussion
Read
Edit source
History
Page actions
Module
Discussion
More
Tools
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Search
Tools
What links here
Related changes
Special pages
Page information