Difference between revisions of "Transclusion"
From Atheism United
(Created page with "A transclusion is like an 'inclusion', but without actually creating a copy of the thing being included. You can transclude a wiki page very similar to how [[temp...") |
m |
||
Line 2: | Line 2: | ||
You can [[transclude]] a [[wiki page]] very similar to how [[templates]] are used, by using [[double-braces]] (<nowiki>{{</nowiki> and <nowiki>}}</nowiki>) instead of [[double-brackets]] ( <nowiki>[[</nowiki> and <nowiki>]]</nowiki>). However, you will also need to use a single colon ( : ) in front of the page name so that the [[wiki]] will [[transclude]] the [[wiki page]] instead of trying to invoke a [[template]] by the same name. For example, <nowiki>{{:Transclusion example}}</nowiki> [[transcludes]] the contents of the [[Transclusion example]] page, as shown here: | You can [[transclude]] a [[wiki page]] very similar to how [[templates]] are used, by using [[double-braces]] (<nowiki>{{</nowiki> and <nowiki>}}</nowiki>) instead of [[double-brackets]] ( <nowiki>[[</nowiki> and <nowiki>]]</nowiki>). However, you will also need to use a single colon ( : ) in front of the page name so that the [[wiki]] will [[transclude]] the [[wiki page]] instead of trying to invoke a [[template]] by the same name. For example, <nowiki>{{:Transclusion example}}</nowiki> [[transcludes]] the contents of the [[Transclusion example]] page, as shown here: | ||
− | + | <hr /> | |
{{:Transclusion example}} | {{:Transclusion example}} | ||
− | + | <hr /> | |
[[Category:Wiki]] | [[Category:Wiki]] |
Latest revision as of 22:34, 12 November 2011
A transclusion is like an 'inclusion', but without actually creating a copy of the thing being included.
You can transclude a wiki page very similar to how templates are used, by using double-braces ({{ and }}) instead of double-brackets ( [[ and ]]). However, you will also need to use a single colon ( : ) in front of the page name so that the wiki will transclude the wiki page instead of trying to invoke a template by the same name. For example, {{:Transclusion example}} transcludes the contents of the Transclusion example page, as shown here:
This is the content of the Transclusion example page. It is transcluded into the transclusion page.