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?

1 Answer 1


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}}}]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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