Template talk:Infobox road

Existence date range for former roads

[edit]

This might only matter in the context of auto trails, but for such trails, we often have a specific date/year that the trail was established (e.g., date of first publication), but not when it was "deleted", since the trail is really functionally obsolete and just stopped appearing in guide books. However, even if I set header_type to 'historic' and status to 'former', the template code and Lua module don't check this when generating the Existed field, and simply append ' - present' to the date. Is this something that we should consider changing? Vmanjr (talk) 20:43, 14 January 2025 (UTC)[reply]

Edit request 10 April 2025

[edit]

Description of suggested change: In the Module:Infobox road/sections used for various road sections, both terminus_a# and terminus_b# are indicated as "From". Rather terminus_b# should have the parameter named as "To". Current usage attached for reference.

{{Infobox road/sandbox
| name = Road a
| terminus_a = City A
| terminus_b = City B
| terminus_a1 = City A1
| terminus_b1 = City B1
}}
Road a
Major junctions
FromCity A
ToCity B
Section 1
TerminusCity A1
TerminusCity B1
{{Infobox road/sandbox
| name = Road z
| terminus_a = North Town
| terminus_b = South City
| direction_a = North
| direction_b = South
| terminus_a1 = North Village
| terminus_b1 = South Town
| direction_a1 = North
| direction_b1 = South
}}
Road z
Major junctions
North endNorth Town
South endSouth City
Section 1
North endNorth Village
South endSouth Town

M2 (talk) 09:47, 10 April 2025 (UTC)[reply]

That module has been essentially unchanged since 16 December 2021, so I'm a bit wary of making this change without further testing. Can you please link to an article that demonstrates the problem? – Jonesey95 (talk) 16:32, 10 April 2025 (UTC)[reply]
It seems as though "from" and "to" are arbitrary labels. I see the word "from" in this case to mean "extending from", which can go at either end of a road or even to both ends. I do see where confusion may arise, but I don't think this edit is the answer. Who gets to say where a road begins and ends? someone in the "from" city, or someone in the "to" city? Objective observers might scratch their heads. P.I. Ellsworth , ed. put'er there 22:25, 10 April 2025 (UTC)[reply]
An example where you can see both Froms is Delhi–Meerut_Expressway. The first section of the road has a From/To in the infobox but all other sections are shown as From/From. I agree with the requestor that the change should be made. I'll not do it immediatly though to allow for any further discussion. -- WOSlinker (talk) 22:53, 10 April 2025 (UTC)[reply]
I disagree with this change. Someone in Miami says, "US 1 goes from Miami to New York." A New Yorker then says, "No it doesn't, US 1 goes from New York to Miami!" The "From"s should be replaced with "Starting from" or "Extending from". P.I. Ellsworth , ed. put'er there 23:20, 10 April 2025 (UTC)[reply]
The above examples have been changed to the sandbox, and Module:Infobox road/sections/sandbox has been altered to "Extending from" "Terminus" to illustrate editor Jonesey95's solution. P.I. Ellsworth , ed. put'er there 00:18, 11 April 2025 (UTC)[reply]
"From" in this case is a default, which can be changed (and usually is changed) with the |direction_x#= parameter as shown in the second example. P.I. Ellsworth , ed. put'er there 23:07, 10 April 2025 (UTC)[reply]
What if we changed the default "From" and "To" to both read "Terminus"? That is a neutral term that just means "the end of this section". Editors can change the text to read "XXX end" using |direction_a1= etc. as Paine Ellsworth says above. – Jonesey95 (talk) 01:31, 11 April 2025 (UTC)[reply]
Changed to "Terminus" in the sandbox as shown above. "Terminus" is a good choice to replace "From". P.I. Ellsworth , ed. put'er there 01:48, 11 April 2025 (UTC)[reply]
This at least is a better solution as two "From"s are odd. Also, in the same template, there needs to be uniformity as the first part references "From" and "To", while the sections have two "From"s. Both can be combined under the same label as "Terminii" similar to Template:Infobox rail line?
M2 (talk) 03:04, 11 April 2025 (UTC)[reply]
Both can't/shouldn't be combined because the intermediate junctions are listed in-between, such that the overall order progresses from one terminus to the other. The two termini should always have a direction listed, but if they don't, it should be From and To. Imzadi 1979  04:57, 11 April 2025 (UTC)[reply]
And it must be asked again: how are the "From" and "To" determined? Do editors just arbitrarily pick and choose which terminus should be "From" and which terminus should be "To"? P.I. Ellsworth , ed. put'er there 05:30, 11 April 2025 (UTC)[reply]
The usual method depends on the locale. In the US, we start at the southern or western to follow the milepost direction. In other countries, there's are other standardized methods, just as the zero milestone or kilometer zero, etc. Imzadi 1979  05:34, 11 April 2025 (UTC)[reply]
"The usual method..." That's key, isn't it. It's all explained in the Milestone article. Seems several US states have their own way to mile-mark their roads (except the Interstates). I still say the best solution to all this is Jonesey95's choice of "Terminus". That is the least ambiguous, the least OR, the most objective, concise way to label... the end of the road. P.I. Ellsworth , ed. put'er there 07:24, 11 April 2025 (UTC)[reply]
@Paine Ellsworth: since the article text needs to progress from one end to the other in the prose route description, even though the roadway is question is probably bi-directional, that text is going to arbitrarily run from one end to the other, A → B. The infobox then should match the directionality from the prose.
In any case, it really should be an error of sorts, to omit the direction label that accompanies the terminus. Those two labels could be west/east or east/west, south/north or north/south, etc. They could even be CW and CCW on a beltway. The "From" and "To" are really a default when someone hasn't properly used the template to display something, but at least it gives some clue about the content of the article. Imzadi 1979  15:48, 11 April 2025 (UTC)[reply]

One of the From/From pairs in the code was changed to a From/To on 14 Dec 2021 but the other pair was left as From/From. There should be some consistency, so they should either both be From/From or both From/To. I've also expanded the examples above. -- WOSlinker (talk) 07:48, 11 April 2025 (UTC)[reply]

Regarding the determination of From/To, it might be arbitrary in many cases as all roads do not have standardized way of designating a source and a destination. At least for the sake of consistency, it should either be From/To everywhere (where sources are available designating a From/To, it can be used and for other cases, it would be left at the behest of the editor) or if there is consensus, it can be changed to some general label such as "Terminus" both at the top and in the segment sections. M2 (talk) 09:34, 11 April 2025 (UTC)[reply]
The original template didn't have the sections, and it has long used From/To. When the capability to add sections was added, my memory is that they also defaulted to From/To. Any edits that changed that to From/From would be an error, IMHO, and that should be reversed to restore From/To in the sections as the default. As mentioned above, the defaults should be treated as an error in most cases because the directionality should be specified. Imzadi 1979  15:50, 11 April 2025 (UTC)[reply]
Thanks for the explanation. Pending more substantive improvements or a consensus on the use of "Terminus", I have made the From/To labeling consistent in both sections. I don't love the default "From/To", but having "From/From" in one if/else section and "From/To" in the other section was inconsistent and worse. Feel free to continue this discussion and to enhance this possibly interim cleanup step. – Jonesey95 (talk) 14:38, 15 April 2025 (UTC)[reply]
That was my work in 2021. From/From was a stupid copy/paste mistake. It was supposed to be "From/To". –Fredddie 04:12, 6 September 2025 (UTC)[reply]
That was my guess, but I didn't want to label any person or edit as stupid except for myself and my own edits. This is why we have collaborative editing. Keep on going! – Jonesey95 (talk) 02:03, 8 September 2025 (UTC)[reply]

Edit request 7 July 2025

[edit]

Description of suggested change: Add piped link to NHS parameter

Diff:

|label18 = <abbr title="National Highway System">NHS</abbr>
+
|label18 = [[National Highway System (United States)| <abbr title="National Highway System">NHS</abbr>]]

Dream out loud (talk) 21:12, 7 July 2025 (UTC)[reply]

 Done * Pppery * it has begun... 23:09, 11 July 2025 (UTC)[reply]

Template-protected edit request on 12 July 2025

[edit]

Can you add local function AMR to the module? AMR browselinks should direct to Arab Mashreq International Road Network. Editor Socks (talk) 06:07, 12 July 2025 (UTC)[reply]

 Not done: please make your requested changes to the template's sandbox first; see WP:TESTCASES. * Pppery * it has begun... 04:41, 21 July 2025 (UTC)[reply]

Non-functional params

[edit]

According to the documentation, the parameters previous_dab and next_dab can be used to disambiguate the previous and next routes, respectively. However, these parameters don't actually do anything at all. I think the issue is traceable to Module:Road data/browse; at lines 44 and 49 we can see that the values of previous_dab and next_dab are included in the argument to the functions previousRoute() and nextRoute(), but the definitions of those two functions at lines 14 and 26 never make any use of those values. --R'n'B (call me Russ) 19:57, 1 September 2025 (UTC)[reply]

The infobox uses modules to handle the graphics, links and abbreviations, just as {{jct}} does. So for highways in Michigan, it would use Module:Road data/strings/USA/MI, and it should pass through the dab needed to that module to customize the links. Is that not happening? Imzadi 1979  23:37, 1 September 2025 (UTC)[reply]
It is not happening. Please see User:R'n'B/sandbox, where I've copied an infobox that appears on the page A38(M) motorway. In the first infobox, I've omitted the previous_dab parameter; in the second infobox, I've included it. As you can see, both infoboxes contain the same incorrect link to the disambiguation page A8(M) motorway in the output. --R'n'B (call me Russ) 15:26, 2 September 2025 (UTC)[reply]
I was summoned so I'll reply. The infobox is working as intended. The AM entry on Module:Road data/strings/GBR did not accept a dab, so no matter what you did it wouldn't work. I believe dab has been added and everything should work now. –Fredddie 16:11, 2 September 2025 (UTC)[reply]
The issue is not with the template passing through the dab, but with Module:Road data/strings/GBR not accepting it. It was missing the dab from the AM type. Adding that with this edit corrected the issue. The example in your sandbox now works at it should. Imzadi 1979  16:11, 2 September 2025 (UTC)[reply]

mapframe implementation

[edit]

I noticed this template doesn't have mapframe implemented in the standard manner (cf. Wikipedia:Mapframe maps in infoboxes). So I implemented it that way in the sandbox.

However, I noticed that the check for unknown parameters was already aware of a subset of mapframe* parameters, but I could find no further implementation.

The code at Module:Infobox road/map seems to me like it only renders normal images. It does seem to interact with Wikidata already, but only where wikidata:Property:P15 exists.

Does anyone remember what happened there? --Joy (talk) 10:50, 26 September 2025 (UTC)[reply]

All I found was this 2020 test by @Fredddie. I guess that just never went live.
I'll proceed then. --Joy (talk) 19:19, 26 September 2025 (UTC)[reply]