Media Wiki Concepts: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 27: Line 27:
A ''template'' is a page in the "Template:" namespace that gets [[#Transclusion|transcluded]] in regular pages that refer to it. This mechanism is useful to disseminate complex content into multiple target pages, while editing the source context in just one place and referring to it via a simple name from the target pages.
A ''template'' is a page in the "Template:" namespace that gets [[#Transclusion|transcluded]] in regular pages that refer to it. This mechanism is useful to disseminate complex content into multiple target pages, while editing the source context in just one place and referring to it via a simple name from the target pages.


 
This is how a template gets declared:
Usage examples:


<blockquote style="background-color: #f9f9f9; border: solid thin lightgrey;">
<blockquote style="background-color: #f9f9f9; border: solid thin lightgrey;">
:[[Media Wiki Editing#Templates|Media Wiki Editing - Templates]]
:[[Media Wiki Editing#Templates|Media Wiki Editing - Templates]]
</blockquote>
</blockquote>
This is how a template gets referred:

Revision as of 04:27, 4 January 2017

Internal

Transclusion

https://www.mediawiki.org/wiki/Transclusion

Transclusion means the inclusion of the content of a document into another document by reference. The most common situation where transclusion is used is the use of templates: the same content can be included in multiple documents without having having to edit those documents separately.

Namespace

https://www.mediawiki.org/wiki/Help:Namespaces

Templates

https://www.mediawiki.org/wiki/Help:Templates


A template is a page in the "Template:" namespace that gets transcluded in regular pages that refer to it. This mechanism is useful to disseminate complex content into multiple target pages, while editing the source context in just one place and referring to it via a simple name from the target pages.

This is how a template gets declared:

Media Wiki Editing - Templates

This is how a template gets referred: