Help:Transclusion/How Transclusion Works: Difference between revisions

Content deleted Content added
m Fixing style/layout errors
Tag: Reverted
c/e move hatnote
Tag: Reverted
Line 1:
{{Hatnote|Note: this section is transcluded from [[Help:Transclusion/How Transclusion Works]]}}
To '''transclude''' any '''source''' page (within a single MediaWiki project, such as en:Wikipedia), include the following code in the '''target''' page:
 
Line 18 ⟶ 17:
 
Transclusion creates a "live" link between the template page and the target page(s) upon which the template's contents should appear. When the template is edited, the rendering of that template on the target pages is updated as well. Let's say you create a (template) page in Wikipedia with the address of a local Wikimedia event. Next, you transclude that template on your talk page, and also on the talk pages of all local editors to be invited. A week later, the event is moved to a slightly larger place. You would then update the address template, and the ''revised'' address will automatically appear on all the other attendees' pages.
 
There are further examples at [[mw:Transclusion]].
 
Breaking existing transclusions in a template is called '''breakage'''. It is to be avoided if possible, as the break will propagate through every target page in which the template (source) page was transcluded.