O'Reilly logo

MediaWiki by Daniel J. Barrett

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Advanced Article Construction

So far, we’ve looked at wiki articles as individual documents, constructed from familiar parts like paragraphs, formatted text, bulleted lists, tables, and so on. In this view, the goal is to turn ideas into articles and to write and typeset them effectively. But of course, a wiki is more than a bunch of independent articles. The collection serves a common purpose, whether it’s an encyclopedia, a taxonomy of pets, or a corporate knowledge system. That’s why we use categories and namespaces to organize articles: to make the information findable and serve this common purpose. In this chapter, we’ll continue to take this “larger” view of the wiki and construct sets of articles that share information among themselves.

Suppose you’re writing a series of 50 wiki articles about pet illnesses, and every article contains the same link to a popular veterinary website. You could simply copy and paste the link into each article, but if the URL ever changed, you’d need to update all 50 articles. This kind of annoyance is called a maintenance problem, and it gets worse as wikis grow. With MediaWiki, you can avoid this problem by writing the URL in only one article and automatically making it appear in all 50, by way of a feature called transclusion. This is just one of MediaWiki’s sharing features we’ll discuss in this chapter. Others include:

Consistency maintenance

Why share content among articles?

Variables

Special words that stand for (and expand into) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required