Template transclusion

Transclusion is generally the inclusion of the content of a document into another document by reference. In the Wikipedian context, it is the use of the template functionality of MediaWiki to include the same content in multiple documents without having to edit those documents separately.

How it worksEdit

To transclude any source page (within a single MediaWiki project, such as en:Wikipedia) within another target page, include the following code:


Whenever the target page A with this code is rendered, the engine will include in that place not the code itself, but the entire content of the source page B, SOMEPAGE.

What is the syntax?Edit

  • If the source is in the Main article namespace (e.g., "Foo"), you must put a colon (:) in front of the name, thus: {{:Foo}}
  • If the source is in the Template namespace (e.g., "Template:Foo"), just use the name itself, alone, thus: {{Foo}}
  • If the source is in any other namespace (e.g., "User:Example"), you must use the full name, including the namespace, thus: {{User:Example}}

See alsoEdit