Template talk:RoutemapRoute/Archive 1
![]() | This is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 1 |
Development Ideas
This template was created mainly to allow the addition of (<–Bristol–Paddington–>) -type information to routemaps, for example, where a branch-line meets a main-line, to indicate the direction of traffic flow on the associated route.
Little thought went into the initial design, however, during creation I realised that it could be used more generically, and all the 'conditional stuff' was put in too.
Now, before it is rolled-out to other routemaps, it seems sensible to canvass opinion regarding the template features and usability, in case any changes need to be applied.
Certain questions spring to mind, but other editors may have additional comments to make...
- Is the name "RoutemapRoute" OK?
(I couldn't think of anything better at the time.) - The main parameter names are currently 'to' and 'from'. Are these OK? Or would it be clearer to use 'left' and 'right' instead, or something else?
- The arrows were the first suitable icons I found within Wikipedia. I think they look OK -- they certainly don't look out-of-place in the routemaps -- but are there any which would be better suited?
- Is there a need to be able to disable the outer brackets?
(Can be achieved with an optional parameter if this is a requirement.) - Is there a likely need for 'to' or 'from' uses where the arrow points to the text, rather than away from it?
(This might be best served with a second template with the icons the other way round.) - Are there any other permutations I haven't thought of?
Comments welcome.
EdJogg 10:33, 12 September 2007 (UTC)
- Excellent idea. I would have thought that left= and right= would be more useful. Up= and down= might also be useful, for example in Tipton Green and Toll End Canals. The concept of to and from rather depends on where you think the start is! Also, brackets=no and towardstext=yes might be useful. Best wishes. Oosoom Talk to me 13:09, 12 September 2007 (UTC)
- Thank you. Have found these in the same set ( ), so up/down should be possible.
- (Boy is it going to be hard to read the source code!) -- EdJogg 13:54, 12 September 2007 (UTC)
Agree that left=, right=, up= and down= would be more intuitive to specify the arrows appropriately. However, it should be noted that up and down do not necessarily refer to the direction of the train's travel in relation to London as the terms "up train" and "down train" are not used in North America (but commuter lines typically use "inbound" and "outbound" in relation to whatever the main city center is).
BTW, I found and removed an extra </noinclude> statement that was messing up the formatting on the examples you gave elsewhere. Slambo (Speak) 16:00, 12 September 2007 (UTC)
- Thanks for the tweak. I'm now developing templates using a user sandbox for the purpose, so such issues should be avoided in future.
- As for the parameters, I am mulling-over a format which specifies the arrows and text separately, such that 'Up/Down/Left/Right' will simply indicate the direction of the arrow. Unfortunately, this requires a ground-up redesign of the template...!
- As you're well-versed in template technology, could you suggest a good example that uses 'switch'?
- EdJogg 17:31, 12 September 2007 (UTC)
- Well, {{TrainsWikiProject}} makes extensive use of switches, but it seems simpler to allow the user to put in something like {{RoutemapRoute| up=StationA| down=StationB}} ( StationA - StationB ) or even a mix like {{RoutemapRoute| left=StationC| down=StationD}} ( StationC - StationD ). Why someone would want to mix up/down and left/right like this is left to be seen, but we should be able to do something like:
({{#if:{{{up|}}}|[[Image:Arrow Blue Up 001.jpeg|10px]] {{{up}}} }}<!-- -->{{#if:{{{left|}}}|[[Image:Arrow Blue Left 001.jpeg|10px]] {{{left}}} }} - <!-- -->{{#if:{{{down|}}}|[[Image:Arrow Blue Down 001.jpeg|10px]] {{{down}}} }}<!-- -->{{#if:{{{right|}}}|[[Image:Arrow Blue Right 001.jpeg|10px]] {{{right}}} }})
- This doesn't include logic to hide the hyphen symbol if only one of the two sides is specified, but that's the basic idea. Slambo (Speak) 17:45, 12 September 2007 (UTC)
- Don't just think of railways - other maps may want left/up/right/down all on the same line (perhaps to indicate destinations on a (rambling) sign post? Canal maps might very well start with left/up/right as does Tipton Green and Toll End Canals. Oosoom Talk to me 18:38, 12 September 2007 (UTC)
- Are 3-/4-arrow instances really required? Please discuss in new section below. EdJogg 09:04, 13 September 2007 (UTC)
Braces or Brackets?
I don't think braces is the correct term for the ( ) symbols. Braces are { }, brackets are [ ], and parentheses are ( ). However, in common usage, brackets often mean ( ) and are also a generic term for enclosing marks - useful if the type of punctuation symbol or even some other graphic were to be chosen in future. :) Oosoom Talk to me 08:34, 13 September 2007 (UTC)
- Heck, I'll go with the flow...I just don't suggest anyone starts using this template yet! (It's fine on your sandbox though.) Getting it 'just right' will take time...
- Since there may be potential US users of this template, perhaps Slambo can confirm that the term 'brackets' would be an acceptable replacement?
- EdJogg 08:50, 13 September 2007 (UTC)
- As I know them "(" and ")" are parentheses, "{" and "}" are curly braces or curly brackets, "[" and "]" are square brackets or sometimes just brackets. Perhaps a better term for a parameter name here would be "enclosed"? Slambo (Speak) 11:28, 13 September 2007 (UTC)
- Good lateral thinking: 'enclosed' it is, then, unless anyone objects strongly. EdJogg 13:13, 13 September 2007 (UTC)
Multiple routes (>2)
This template is only proposed to support 1 or 2 routes (arrows). Is there much need for a 3- or 4-arrow template? If so, it might be best to create a second template based on the 1-/2-arrow original. 'Nesting' them will ensure consistency, but will require some interesting code!
For the example given earlier, Tipton Green and Toll End Canals, the top line (for Walsall Canal) could use a 4-arrow template. Alternatively, if an extra icon row is added above and below the Walsall Canal, only 2-arrow templates will be needed ('up' is covered by "Tame Valley Canal", 'Down' can be handled by a new entry for "Ocker Hill Tunnel Jn" on the line below (as it gives no detail of this at present), and the additional line above can use the existing 2-arrow template to indicate the left/right destinations of the "Walsall Canal" itself).
Are there any other examples where a 3- or 4-arrow template would have to be used?
EdJogg 09:03, 13 September 2007 (UTC)
- Fine. Thanks for considering it. I imagine two arrows will be fine for nearly everything. Oosoom Talk to me 19:34, 13 September 2007 (UTC)
RoutemapRoute - REDESIGN
I have taken on board all of the above comments and attempted a redesign.
The new version has the following features:
- Display of one or two 'placenames' (or none!)
- Hyphen when two placenames defined
- Left/Right/Up/Down or no arrows to left and/or right (positioned as for original template)
- Arrow selection independent of text
- Suppressable brackets (enclosure)
I have created a new subtemplate: {{RoutemapRouteIcon}} which allows selection of the arrow icon, and potential for future expansion (other colour icons?)
The revised RoutemapRoute template code is lurking in my new template sandbox, but examination of this sandbox will show you:
- the (unformatted) template source code
- wikisource for 12 variations that the template can produce
- example output corresponding to the wikisource
(I have not included the code/examples on this page, as the sandboxes will be re-used once the new code has gone live, and the links would become stale.)
Before rolling-out the revised template, which will require all existing uses to be re-written, I wanted to sound-out the parameters I have used:
- Licon=XXX - selects the left icon (valid parameters listed at {{RoutemapRouteIcon}})
- Ricon=XXX - ditto for right icon
- Station A, Station B - no parameter names, just separate entries in template. Where two are defined, first will be placed on left and a hyphen will separate them.
- enclosed=no - disables the brackets (if omitted, brackets appear by default)
In particular, are 'Licon' and 'Ricon' appropriate names to use? Would 'L' and 'R' be better alternatives? (would they be allowed?)
All (constructive) comments welcome!
Change you made to RoutemapRouteIcon
Moved from User talk:Useddenim
The change you made to RoutemapRouteIcon while a sensible idea I did think of this but I couldn't think of a way to do this in conjunction with the RoutemapRoute template. So you change has broken the RoutemapRoute template so unless you can think of a way to fix that template can you please roll it back.
Thanks --Dkbottomley (talk) 10:27, 4 April 2014 (UTC)
- Lemme think about it and get back to you. Useddenim (talk) 11:16, 4 April 2014 (UTC)
- Just FYI: some time ago I added similar parameters "Lsize" and "Rsize" to ru:Template:RoutemapRoute (in rmri, it's just {{{3}}}), and it seems that recently Sameboat copied this at Template:RoutemapRoute. YLSS (talk) 13:59, 4 April 2014 (UTC)
- I'm not sure what you meant by “you[r] change has broken the RoutemapRoute template” as I couldn’t find any examples of it not displaying correctly. And, in fact, I’ve always been somewhat uncertain of the actual need for this template:
RoutemapRoute template – Example usage WikiSyntax Display {{rmr|Licon=Left|[[Minehead]]|[[Taunton]]|Ricon=Right}}
( Minehead – Taunton ) ({{rmri|L}} [[Minehead]] – [[Taunton]] {{rmri|R}})
( Minehead – Taunton ) {{rmr|[[Taunton]]|[[Minehead]]|Licon=U|Ricon=D}}
( Taunton – Minehead ) ({{rmri|U}} [[Taunton]] – [[Minehead]] {{rmri|D}})
( Taunton – Minehead ) {{rmr|Licon=L|[[Minehead]]||}}
( Minehead) ({{rmri|L}} [[Minehead]] )
( Minehead ) {{rmr|[[Taunton]]|[[Minehead]]}}
(Taunton – Minehead) ( [[Taunton]] – [[Minehead]] )
( Taunton – Minehead ) {{rmr|Licon=R|Ricon=L||}}
({{rmri|R}} {{rmri|L}})
( ) {{rmr|[[Taunton]]|Ricon=R|||enclosed=no}}
Taunton [[Taunton]] {{rmri|R}}
Taunton {{rmr|Ricon=L|||enclosed=no}}
{{rmri|L}}
- In every case the identical result can be reproduced in less space using {{rmri}} and wikitext. Useddenim (talk) 00:38, 5 April 2014 (UTC)
- (Actually, if we use "rmr" & "rmri", then in most cases, not all. YLSS (talk) 05:55, 5 April 2014 (UTC))
After I made the change I changed a couple of articles that before hand were using the rmr template with arrows that were causing a break in the line diagram. With the smaller Icons be breaks were removed. Now you have made the change so that rmri uses a 3rd parameter and not a different 2nd when passed from rmr to rmri the switch option will no longer be available so like the rmr documentation no icon at all will show. I will have to go through my edit history to remember which maps I changed to use the new option.--Dkbottomley (talk) 10:09, 5 April 2014 (UTC)
So the way I read this the rmr template is pointless. And you've made a change that had made changes to pages that use the rmr template which will no longer be showing the icon due to the fact that they are in the format of {{rmr|Licon=sl|[[Minehead]]|[[Taunton]]|Ricon=sr}}
now give (Invalid Template:RoutemapRoute arrow value "sl". Minehead – Taunton Invalid Template:RoutemapRoute arrow value "sr".) while it did give Minehead – Taunton before you made the change --Dkbottomley (talk) 19:29, 10 April 2014 (UTC)