Advanced wiki stuff

Revision as of 20:36, 21 November 2024 by Doug (talk | contribs) (init + templates)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Mediawiki is a beast that carries many on its back. With all the effort made towards backwards-compatibility and deep internationalization, there are a lot of moving parts.

Templates

Are called with {{ or using the visual editor top bar. Like templates generally, they allow for easily creating, and globally changing, small units within the page. Existing template can be seen at on Special:AllPages when you select the Template namespace. As with everything, looking at working examples, copying and adapting is a good way to get hacking. TemplateData and ParserFunctions are enabled extensions (you can see on Special:Version). TemplateData allows you to specify parameters, which will be presented to users in a visual form when using the template, greatly easing template use. ParseFunctions allows for some simple logic, like checking to see if a certain parameter is given, and deciding how to render the template accordingly (see Template:Roombox for example). To complicate matters, we are currently using different skins for laptop and mobile, and since you cannot specify @media rules directly in the template CSS, you may need to edit MediaWiki:Common.css