Content deleted Content added
expanded content to be less verbose in order to improve clarity Tag: Reverted |
grammar; changed example, as we don't typically share editor street addresses on WP, especially not en masse. Replaced with something uncomplicated but still in context of WP Tag: Reverted |
||
Line 6:
Whenever a target page with this code (<code><nowiki>{{SOURCEPAGE}}</nowiki></code>) is rendered, the engine will include the entire content of <code><nowiki>SOURCEPAGE</nowiki></code> in the target page.
In the example below, let the target page be '''A''' and <code><nowiki>SOURCEPAGE</nowiki></code> be '''B'''
If <code><nowiki>{{B}}</nowiki></code> is rendered, then the engine will include ''in that place'' not the code (<code><nowiki>{{B}}</nowiki></code>) itself but the content of source page '''B''' (which in this example, consists of only one word, foo).
The top row shows what the target page renders as, while the bottom row shows the code. Note: foo will not be highlighted nor boxed on the target page.▼
▲The top row shows
<div style="margipadding: 0.5em;">[[File:Transclusion-multiple-foo.svg]]</div>
Line 14 ⟶ 16:
A typical use case for transclusion would be if you wanted to place the same welcome message on multiple newcomer talk pages.
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
There are further
Breaking existing transclusions in a template is called '''breakage'''. It is to be avoided if possible, as the
|