Important: Wikitravel is exploring a license upgrade to CC by-sa 3.0, please give your consent or refusal here.

Template talk:Related

From Wikitravel

Jump to: navigation, search

[edit] Enhancing this template

Are there any objections to URL encoding the argument to this template? Basically change <rdf><> dc:relation :{{{1}}} .</rdf> to <rdf><> dc:relation :{{urlencode:{{{1}}}}} .</rdf>? Currently {{related|Name of article}} won't work and you have to enter {{related|Name_of_article}}. The only downside to automatically URL encoding would be that any existing implementation of this template that escaped parentheses to %28 (or any other URL encoded escapes) would need to be updated, but I don't think there are many such implementations. -- Ryan • (talk) • 14:43, 22 February 2009 (EST)

I'd be happy to see it changed, although I wouldn't want to hunt through the 600+ inclusions to see which ones break ;) --Peter Talk 15:25, 22 February 2009 (EST)
Agreed, trying to audit all uses would be distinctly un-fun and isn't something that I would recommend we try to do - I think just as changing region names can break "isIn" usage that there would probably be some fallout with a small percentage of "related" tags being broken, but it would be trivial to fix those as they are found, and the benefit of simplifying the usage of this template would seem to outweigh any disadvantages IMHO. -- Ryan • (talk) • 16:04, 22 February 2009 (EST)
I'll volunteer to change all 600+ articles, if you make the change. -- Sapphire(Talk) • 16:09, 22 February 2009 (EST)
Let's let this sit for 24 hours to see if anyone has any objections before making a change. The vast majority of uses of this template wouldn't require any change since Mediawiki automatically converts undescores to spaces, but anything that escaped characters other than underscores - such as "(" to "%28" - would need to be fixed. -- Ryan • (talk) • 16:28, 22 February 2009 (EST)
Given the lack of objections I've made this change and verified that a few pages with related: tags are still working as expected. -- Ryan • (talk) • 22:04, 23 February 2009 (EST)

[edit] Bug

If there is a period in the article name (e.g., {{related|Washington D.C.}}), the inclusion of this template will cause all RDF on the page to break. --Peter Talk 05:02, 19 September 2009 (EDT)