[Mediawiki-l] 1.4.9 -> 1.5.0: external links as relative links ?

Rowan Collins rowan.collins at gmail.com
Mon Oct 17 11:17:05 UTC 2005


On 17/10/05, ralf-buero at kruedewagen.de <ralf-buero at kruedewagen.de> wrote:
> But then let me ask how I can add a link to mediawiki, which will then
> be parsed to
>
> <a href="../../foo">Foo Pages</a>
>
> I think there should be an official way to link from the wiki to
> another (virtual) server on the same box. I would name this a
> "relative link".

This was in my last e-mail, but I did fear it might get lost under the
other stuff:

You can use MediaWiki's {{SERVER}} variable to do exactly this -
basically, "[{{SERVER}}/myPage My Page]" should work. See
http://meta.wikimedia.org/Help:Variable for details and other
available varaibles.

To clarify, {{SERVER}} expands to the FQDN, so this does *server-side*
what you were relying on happening client-side. [Of course, when
you're coding HTML, you would just use a standard relative link, as in
<a href="/myPage">, but that's hard to parse in the context of
wiki-markup, and the result is essentially the same]

--
Rowan Collins BSc
[IMSoP]



More information about the MediaWiki-l mailing list