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 (Tag: Visual edit) |
What is a transclusion?[edit | edit source]
Transclusion means the inclusion of a certain part of a document into another. The template of a transclusion is called transcludethe content of one page (the transclude) in the content area of another page. Most often, templates are used to achieve a transclusion. 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]] " src="/extensions/BlueSpiceFoundation/resources/bluespice/images/bs-ajax-loader-pik-blue.gif?Transclusion_simple.svg.png"]] == What is a transclusion? == Transclusion means the inclusion of a certain part of a document into another. The template of a transclusion is called transcludethe content of one page (the transclude) in the content area of another page. Most often, templates are used to achieve a transclusion. 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]][[en:{{FULLPAGENAME}}]] [[de:Transklusion]]
(3 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __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]] | + | [[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" src="/extensions/BlueSpiceFoundation/resources/bluespice/images/bs-ajax-loader-pik-blue.gif?Transclusion_simple.svg.png"]] |
− | Transclusion means the inclusion of | + | == What is a transclusion? == |
+ | Transclusion means the inclusion of the content of one page (the transclude) in the content area of another page. Most often, templates are used to achieve a transclusion. If the content of the transclude is changed, the alteration is visible on all sites containing the transclusion. | ||
==Scope of application== | ==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: | 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 | + | *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 | + | *Table: Parts of it or whole tables will be displayed on other pages through transclusion |
==The functions of transclusions== | ==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. | + | 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. | 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== | ==Transclusions with Parameters== | ||
− | It is possible to use both named and unnamed parameters with transclusions. | + | It is possible to use both named and unnamed parameters with transclusions. |
==Partial transclusion== | ==Partial transclusion== | ||
By using the tags "noinclude", "onlyinclude" and "includeonly" it is possible to only transclude parts of a document. | By using the tags "noinclude", "onlyinclude" and "includeonly" it is possible to only transclude parts of a document. | ||
− | * | + | *:<tt><nowiki> <noinclude>...</noinclude></nowiki></tt> |
+ | *Allows to exclude the content between the tags of the transclusions | ||
− | * | + | *:<tt><nowiki><includeonly>...</includeonly></nowiki></tt> |
+ | *Allows to transclude the content between the tags, but doesn't show them on the transclusion template. | ||
− | * | + | *:<tt><nowiki> <onlyinclude>...</onlyinclude></nowiki></tt> |
+ | *Allows only to transclude the content between the tags. | ||
==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] | ||
− | + | [[en:{{FULLPAGENAME}}]] | |
− | + | [[de:Transklusion]] | |
− | |||
− |