Rewriting a commonly used template for the wiki

Posted by Tigerfell on 4 September 2018 in English (English).

I am currently planning to rewrite the Relation template for the OpenStreetMap-Wiki. You can find the current version along with its documentation in the wiki. In the following text I would like to outline the objections behind my proposed rewrite and invite you to participate.

Purpose of the template

  • common appearance and functionality (general goal of templates)
  • maintainability as the wiki markup is just saved once, so if a tool is obsoleted, it can be removed from the template
  • referring to relations in wiki articles
  • creating links to tools automatically
  • often used to document the mapping status of relations in wikitables

Reasons for a rewrite

  • This template is commonly used and causes many pages to exceed their page limits. You can see the effects of this on the bottom of the wiki page about Beijing buses.
  • Some of the tools featured in the template are not accessible anymore.
  • The default settings cause all tool links to appear, but this is often not desired by the editors.
  • The template‚Äôs code is hard to maintain as it is currently written in wiki markup including parser functions, thus not allowing line breaks or additional white spaces.

My suggestion

  • Rewriting this template using Lua, based on a forum discussion.
  • Changing its defaults regarding the appearance of tool links.
  • Dropping uncommonly used features.

A documentation of my proposed changes is located at

Please feel free to comment your suggestions here or into the forum thread already used.

Login to leave a comment