Difference between revisions of "Transclusion"
m (→Classic revisions with MediaWiki) |
![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](/w/nsfr_img_auth.php/thumb/d/d8/Transclusion_simple.svg.png/300px-Transclusion_simple.svg.png)
[[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 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]] " src="/extensions/BlueSpiceFoundation/resources/bluespice/images/bs-ajax-loader-pik-blue.gif?Transclusion_simple.svg.png"> 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] [[en:{{FULLPAGENAME}}]][[de:Transklusion]]
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 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. | + | 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== | ==Scope of application== | ||
Line 12: | Line 12: | ||
==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> | : <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]] |