Template talk:Infobox rail line
{{Permanently protected}}
{{Talk header}}
{{Old AfD multi |date1=27 July 2013 |result1=Do not merge |link1={{canonicalurl:Wikipedia:Templates for discussion/Log/2013 July 27#Template:Infobox rail}} |date2=2 May 2015|result2=Merge |link2={{canonicalurl:Wikipedia:Templates for discussion/Log/2015 May 2#Template:Infobox_rail_line}} |date3=2020 December 26 |result3=Nothing to merge, just replace "infobox route map" with "infobox rail line" or "infobox rail" |link3={{canonicalurl:Wikipedia:Templates for discussion/Log/2020 December 26#Template:Infobox route map}}}}
{{WikiProject banner shell|
{{WikiProject Infoboxes}}
{{WikiProject Trains}}
}}
{{User:MiszaBot/config
| algo = old(180d)
| archive = Template talk:Infobox rail line/Archive %(counter)d
| counter = 2
| maxarchivesize = 50K
| archiveheader = {{Automatic archive navigator}}
| minthreadstoarchive = 1
| minthreadsleft = 4
}}
Dark mode problems
Template:Greenbush Line is displaying OK for me in dark mode, but in the context of Greenbush Line, there is some nearly impossible-to-read text that is nearly white-on-white. The CSS color handling in this template has gotten rather complicated and it's used on a lot of pages, so I'm wondering if there's an expert who would know better than me how to fix it? If it's helpful, there are recommendations at mw:Recommendations for night mode compatibility on Wikimedia wikis. It might be as simple as just not setting a background color. -- Beland (talk) 05:29, 5 September 2024 (UTC)
:I managed to find the problem and fix it with an edit to Template:Routemap/styles.css. -- Beland (talk) 18:30, 9 September 2024 (UTC)
::Grf, that caused other problems. Reverted and following up on Template talk:Routemap#Dark mode problems. -- Beland (talk) 18:51, 9 September 2024 (UTC)
Add a cost section
I dont know how to code it but someone please add cost in the template under the owner section and auto turn whatever amount into dollars. Thanks :] Faisalisonline2 (talk) 07:44, 6 June 2025 (UTC)
Generate short description
There are approximately [https://en.wikipedia.org/w/index.php?search=-hastemplate%3A%22Short+description%22+hastemplate%3A%22Infobox+rail+line%22&title=Special%3ASearch&profile=advanced&fulltext=1&ns0=1 800 pages] that don't have short descriptions but use the rail line infobox. Short descriptions could be generated from the infobox (documentation). One option is "Rail line in
:I looked at {{t1|Infobox political party}} as an example and it tests the value of {{t1|Has short description}} to prevent overriding a local value. That seems reasonable. There's no guarantee that locale is set, though it should be, so "Rail line in
::According to the above documentation, specifying |2=noreplace
in the Infobox's short description allows a short description specified in the article to take precedence. Brigandeur (talk) 20:34, 12 June 2025 (UTC)
Edit request 16 June 2025
{{Edit template-protected|answered=yes}}
Description of suggested change:
Generate short description from this Infobox. I added the following checks:
- There is no short description already in the article.
- The article is in the main namespace.
- The Infobox is in the lead.
I used the snazzy Type in location module which cleans up the {{code|locale}} parameter before using it, and falls back to "Rail line" if {{code|locale}} is empty or missing.
Testing is not straightforward, so before adding the namespace check, I copied a couple of pages to my user namespace and used the sandbox version there.
Diff:
See my changes in Template:Infobox_rail_line/sandbox
Brigandeur (talk) 00:58, 16 June 2025 (UTC)
: {{re|Brigandeur}} {{done}}. Est. 2021 (talk · contribs) 09:42, 18 June 2025 (UTC)