OpenStreetMap Forum

The Free Wiki World Map

You are not logged in.

#1 2018-07-30 09:32:15

Wynndale
Member
Registered: 2009-04-26
Posts: 37

Rewriting {{relation}}

The template https://wiki.openstreetmap.org/wiki/Template:Relation is used in large quantities on some wiki pages and sometimes exceeds expanded page limits. We can now rewrite it in Lua; this may be good for performance but does not itself resolve the very large expanded text exceeding limits. The easy thing to do is to make URLs as short as possible (osm.org intead of openstreetmap.org, // instead of https://) but we probably need to drop low-value links as well.

Offline

#2 2018-08-02 20:40:13

Tordanik
Moderator
From: Germany
Registered: 2008-06-17
Posts: 2,274
Website

Re: Rewriting {{relation}}

I agree with both making the template more performant and reconsidering the list of tools.

However, if we're already considering changing to the list of tools, perhaps this would be a good opportunity to reconsider the template's behavior at a more basic level? Personally, I've always found it odd that {{relation|42}} produces anything except a single link. That not including the various tool links requires additional parameters seems the wrong way around. Especially considering that some of the tools (such as gpx) don't even make sense for the majority of relation types.

And yeah, I already made that point all the way back in 2013 on the talk page. I still feel the same way, though.

Offline

#3 2018-08-05 12:31:44

Wynndale
Member
Registered: 2009-04-26
Posts: 37

Re: Rewriting {{relation}}

That makes sense, have a type= parameter when tools are useful (I suppose you could read the type from the API using Lua but there is enough unneeded overengineering in the wiki as it is)

Offline

Board footer

Powered by FluxBB