3
votes

I have created a website powered by MediaWiki that offers documentation on the interface for a web application.

The URL for my web application may change. However, many articles on this MediaWiki site link to the application.

I would like to create a global constant somewhere called say "WEB_APP_URL" that I may change at any time, and that editors of the wiki can use to link to the application.

That way, I won't have to do a massive find and replace when my application URL changes.

Is this possible? I am working in a LAMP environment. Thank you.

1

1 Answers

6
votes

I think the simplest way is to create a template. That is, you can create a page called Template:web-app URL with this wiki-text:

http://this.is/the/URL/of/the/web.app

and then editors can write things like:

The application is located at {{web-app URL}}.

or:

[{{web-app URL}} David Faux's application]

and the URL will automatically get dropped in.

(That's not the only way — you can get similar effects through internal configurations and hooks — but I think the template-based approach is the simplest.)