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.
I think the simplest way is to create a template. That is, you can create a page called
Template:web-app URLwith this wiki-text:and then editors can write things like:
or:
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.)