Chapter 8. Magic Words, Templates, and Skins
Magic words and templates provide advanced methods for including content that is dynamic or needs to be standardized across pages. Skins determine the overall look and feel of MediaWiki, as well as standard navigation features, and user tools. All three tools can be customized. This chapter will show you how to create your own templates, and how to modify the default MediaWiki skin to change the look and feel of your wiki. In Chapter 9, you will learn how to install and write extensions to MediaWiki, including how to create your own magic words.
This chapter assumes the reader knows what Cascading Stylesheets (CSS) are and how they work. It also assumes a basic understanding of programming languages, ideally PHP. If you are not familiar with CSS, you should familiarize yourself with it prior to reading the section on MediaWiki skins. An excellent introduction is available on Wikipedia at http://en.wikipedia.org/wiki/CSS
. Another good source is Richard York's Beginning CSS: Cascading Style Sheets for Web Design, Second Edition (Wrox, 2004).
Magic Words
Magic Words are special words that serve as placeholders for other content that will appear on a wiki page. Some magic words were introduced in Chapter 4, but they weren't called magic words. The XML-style tags <nowiki>
and <ref>
are both examples of magic words because they are not raw HTML, and both have an impact on the way the content of the page is parsed and displayed.
There are several ...
Get Professional Wikis now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.