Web Applications Stack Exchange is a question and answer site for power users of web applications. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to create a linkage between two media wiki. Specifically, a template that links to an specific article on the other wiki.

I would like to write

See {{otherwiki|Some thing}}

The template otherwiki should convert the above to

[http://linkto.other.wik/Some_thing Some thing]

The template I wrote works pretty well for single-word terms, and it works if I write Some_thing, but I can't get it to work for phrases that contain whitespace.

[https://en.bitcoin.it/wiki/{{{1}}} {{{1}}}]

How do I fix the above template to make it support whitespace?

share|improve this question
up vote 2 down vote accepted

One option would be to set up interwiki links to the target wiki. With that, you can either write your links directly as e.g. [[otherwiki:Some thing|]], or you can encapsulate that into a template ([[otherwiki:{{{1}}}|]]), so the syntax would be exactly as you wanted.

Another option is to use the magic word {{urlencode}}:

[https://en.bitcoin.it/wiki/{{urlencode:{{{1}}}|WIKI}} {{{1}}}]
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.