Jump to content
Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

About templates

From ISSS Wiki
Revision as of 12:18, 23 January 2024 by Thomas (talk | contribs) (Created page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

What are templates

MediaWiki templates are essentially pre-formatted pieces of text that can be included in other pages1. They are designed to be transcluded (embedded) inside other pages2. Here’s a simple explanation:

  • Creation: You create a page in the “Template” namespace. For example, you might create a page called “Template:Welcome” with the contents: "Hello! Welcome to the wiki."2.
  • Usage: You can then insert this template into any other page using the code { {Welcome}} (without the spaces). When that page is viewed, the text “Hello! Welcome to the wiki.” will appear instead of { {Welcome}}. This is called "transclusion"2.
  • Modification: If you change the content of the template, it will automatically update on all the pages where the template is used. For example, if you change “Template:Welcome” to say “Hi there! Welcome to this wonderful wiki.”, all pages using { {Welcome}} will now display the new message2.