Template:OpenRailwayMap Status Entry

From OpenStreetMap Wiki
Jump to: navigation, search

Helper tempate for Template:OpenRailwayMap Status Facility

  • 1 = replaced parameter with |, e. g. {{{r|}}}
  • 2 = original parameter {{{r}}}
  • 3 = ORM State Name as in the file name
  • 4 = ORM State Text

Details see Template:OpenRailwayMap Status Facility.

It first checks the "replaced" variant. If this is not empty, it is used. If it is empty, it checks the not replaced variant. If this is empty, the "white" icon is displayed.

Internals: If a parameter is not given, the "replaced" variant is empty, but the original one is not empty, but is (in this example) {{{r}}}. OTOH, if it is empty, the user must have provided an empty value for the parameter. In this case, the white icon is wanted. Otherwise, the user hasn't provided anything and the image is just omitted.

This is an alternative approach to the one used in Template:State Entry Omit where the replaced and original forms are just compared: if they are equal, the user has provided anything, otherwise, he hasn't.