Daniel Larson Wiki:A Guide on Templates and Modules (OLD): Difference between revisions

From Daniel Larson Wiki
Jump to navigation Jump to search
 
(No difference)

Latest revision as of 17:10, 5 January 2024

In MediaWiki, templates and modules are tools used to streamline content creation, ensure consistency, and to organize complex information.

Templates are reusable pieces of content that allow users to standardize the appearance and structure of content across multiple pages. Templates use a combination of wiki markup and basic HTML/CSS to create specific functionalities. They are particularly useful for things like infoboxes, navigational elements, citations, or any content that needs to be consistently displayed across various pages.

Modules, in MediaWiki, refer to Lua scripting modules. Lua is a programming language integrated into MediaWiki that allows for more complex functionalities and data manipulation compared to traditional wiki markup. Modules can be used to perform calculations, create dynamic content, retrieve data from external sources, and handle more advanced logic and processing within wiki pages.

There are also special kinds of Modules that can affect the whole site (such as Common.css and Common.js) that wiki admins can use to change things like style of the stie or to display site-wide messages.

EmbeddingTemplates

You can embed template into articles by using two curly brackets {{example}} or clicking on "insert" in your toolbar and then "template" in the dropdown menu.

Toolbox image.png

Embedding Modules

For modules, embedding them directly in articles is is highly discouraged for many reasons. It can be overly complex, difficult to maintain, slow page rendering, and can hurt consistency in articles due to there being no accessible Module form of templatedata.

How to Edit Templates

How to Edit Modules

Modules, unlike templates,