Difference between revisions of "Transclusion"
(Created page with "__NOTOC__ File:Transclusion_simple.svg.png|thumb|right|alt=By The original uploader was Xiong at English Wikipedia (Transferred from en.wikipedia to Commons.) [GFDL (http:/...") |
m (→Classic revisions with MediaWiki) |
Transclusion means the inclusion of a certain part of a document into another. The template of a transclusion is called transclude. If the content of the transclude is changed, the alteration is visible on all sites containing the transclusion.
Scope of application[edit | edit source]
By using transclusions, you can maximize the consistency in your wiki, minimize redundancy, and optimize your workflows and code. The use of transclusions is especially indicated for the following cases:
- Banner: It will be displayed on other pages through transclusion
- Table: Parts of it or whole tables will be displayed on other pages through transclusion
The functions of transclusions[edit | edit source]
To use a transclusion, the transclude has to be implemented on the target page by entering the transcludes name in curly braces.
- {{Transclude}}
This causes the target page to show the content of the transclude. Future changes made on the transclude will also appear on the target page.
Transclusions with Parameters[edit | edit source]
It is possible to use both named and unnamed parameters with transclusions.
Partial transclusion[edit | edit source]
By using the tags "noinclude", "onlyinclude" and "includeonly" it is possible to only transclude parts of a document.
-
<noinclude>...</noinclude>
Allows to exclude the content between the tags of the transclusions
-
<includeonly>...</includeonly>
Allows to transclude the content between the tags, but doesn't show them on the transclusion template.
-
<onlyinclude>...</onlyinclude>
Allows only to transclude the content between the tags.
Classic revisions with MediaWiki[edit | edit source]
Further information can be found on mediawiki.org
__NOTOC__ [[File:Transclusion_simple.svg.png|thumb|right|alt=By The original uploader was Xiong at English Wikipedia (Transferred from en.wikipedia to Commons.) [GFDL (http://www.gnu.org/copyleft/fdl.html) or CC-BY-SA-3.0 (http://creativecommons.org/licenses/by-sa/3.0/)], via Wikimedia Commons|Parts of document B are transcluded to document A]] Transclusion means the inclusion of a certain part of a document into another. The template of a transclusion is called transclude. If the content of the transclude is changed, the alteration is visible on all sites containing the transclusion. ==Scope of application== By using transclusions, you can '''maximize the consistency''' in your wiki, '''minimize redundancy''', and '''optimize your workflows and code'''. The use of transclusions is especially indicated for the following cases: * Banner: It will be displayed on other pages through transclusion * Table: Parts of it or whole tables will be displayed on other pages through transclusion ==The functions of transclusions== To use a transclusion, the transclude has to be implemented on the target page by entering the transcludes name in curly braces. : <tt><nowiki> {{Transclude}} </nowiki></tt> : This causes the target page to show the content of the transclude. Future changes made on the transclude will also appear on the target page. ==Transclusions with Parameters== It is possible to use both named and unnamed parameters with transclusions. ==Partial transclusion== By using the tags "noinclude", "onlyinclude" and "includeonly" it is possible to only transclude parts of a document. *<blockquote><tt><nowiki> <noinclude>...</noinclude></nowiki></tt></blockquote> Allows to exclude the content between the tags of the transclusions *<blockquote><tt><nowiki><includeonly>...</includeonly></nowiki></tt></blockquote> Allows to transclude the content between the tags, but doesn't show them on the transclusion template. *<blockquote><tt><nowiki> <onlyinclude>...</onlyinclude></nowiki></tt></blockquote> Allows only to transclude the content between the tags. ==Classic revisions with MediaWiki== Further information can be found on [https://www.mediawiki.org/wiki/Transclusion mediawiki.org] <br /><div id="box-info" style="width: 98%; margin: 20px 0; border: solid 2px #99bbe8; padding: 8px; background-color: #d6e3f2; flow: left;"><br />[[Image:Icon-link.png|left]]<div style="text-transform: uppercase; color: #99bbe8; font-size: 16px; font-weight: bold; margin: 0;">Related topics</div> * [[Vorlagen]] * [[Templates]]
Line 32: | Line 32: | ||
==Classic revisions with MediaWiki== | ==Classic revisions with MediaWiki== | ||
Further information can be found on [https://www.mediawiki.org/wiki/Transclusion mediawiki.org] | Further information can be found on [https://www.mediawiki.org/wiki/Transclusion mediawiki.org] | ||
− | |||
− | |||
− | |||
− |